home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / comm / yrndl140.zip / ydinstl.cmd < prev   
OS/2 REXX Batch file  |  1996-09-24  |  132KB  |  3,993 lines

  1. /*
  2. YDINSTL.CMD v 1.40 by Jerry Levy     24 Sep 96
  3. Comments appreciated: send to jlevy@ibm.net
  4. (Jerry Levy, Marblehead, MA)
  5. */
  6. version = '1.40'
  7.  
  8. /*
  9. ===========History============
  10. See YD.DOC for details.
  11.  
  12. YARNDIAL.CMD v 1.40    24 Sep 96
  13.  
  14.     and companion installer:
  15. YDINSTL.CMD  v 1.40            24 Sep 96
  16.  
  17. ========ERROR TRAPPING============
  18. We can trap and identify various types of ReXX error
  19. conditions:  Error, Syntax, Failure, Novalue, Halt
  20. and Notready, by setting 
  21.     local_error_trapping = 0
  22.  
  23. Default is
  24.     local_error_trapping = 0
  25. but if you have problems, briefly setting this equal
  26. to one may help you identify source of an error.
  27. ==================================
  28. */
  29. local_error_trapping = 0
  30.  
  31. /*
  32. ================WHAT DO WE DO?================================
  33. YDINSTL.CMD is a Rexx program to install YARNDIAL.
  34.  
  35. YARNDIAL is a program to automate the use of YARN and SOUPER
  36. It serves as a front end for C.T. Huang's OS/2 Souper and Yarn programs. 
  37.  
  38. YD.DOC is documentation for both the installer and YARNDIAL.
  39.  
  40. README.1ST is YD.DOC boiled down to essentials.
  41.  
  42. This installer goes out and fetches parameters required by
  43. YARNDIAL.  Installations can be done for every yarn user you
  44. have set up.  Read YD.DOC to learn more about setting up for
  45. multiple users (A different "user"  a different ID,
  46. an installation for a different internet provider, or a
  47. different internet connection mode for a given ID).
  48.  
  49. Each different user for which you set up YARN has been assigned
  50. its own home directory and you can (should) do an install with
  51. YDINSTL.CMD for each.  For each installation, separate Desktop
  52. objects are created which are named to uniquely tie them to a
  53. particular installation.  For each installation, a unique
  54. parameter file (YD_PARMS.DAT) is created and stored in the
  55. home directory.
  56.  
  57. YDINSTL.CMD also creates a suite of useful Rexx .CMD utilities
  58. which are placed in the home directory also.
  59.  
  60. This YDINSTL.CMD v. 0.94 is distributed with YARNDIAL v1.34
  61.  
  62. ==========COPYRIGHT NOTICE AND DISCLAIMER=============
  63. YDINSTL.CMD is Copyright 1996 by Jerry Levy (all rights reserved)
  64. YARNDIAL.CMD is Copyright 1995 and 1996 by Jerry Levy (all rights reserved)
  65.  
  66. These are provided as-is and without charge, with no warranty expressed
  67. or implied as to merchantability or fitness for any particular purpose.  All
  68. responsibility for any and all incidental and consequential damages is
  69. disclaimed.  These programs and associated text files are freeware.  They
  70. may be distributed without restriction providing: (1) this notice and
  71. disclaimer remain intact, (2) all programs and files are included and
  72. unchanged, and (3) they are distributed either in the original .zip archive
  73. or the archive after being unzipped into a folder or onto a disk or other
  74. medium.  Use of either or both of these programs constitutes acceptance
  75. of these terms by all users.
  76. ======================================================
  77. */
  78.  
  79. bs = d2c(8)
  80. tab = d2c(9)            /* Backspace */
  81. cr = d2c(13)            /* enter key, as well as carriage return */
  82. crlf = d2c(13) || d2c(10)    /* carriage return + linefeed */
  83. escape = d2c(27)        /* escape character */
  84. X1 = d2c(0)            /* Extended key */
  85. X2 = d2c(224)            /* Extended key */
  86.  
  87. /* Load RexxUtil if not already loaded */
  88. if RxFuncQuery('SysLoadFuncs') \= 0 then
  89.    do
  90.       call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  91.       call SysLoadFuncs
  92.    end
  93.  
  94. candidate = ''
  95. encrypt = 0
  96. connection_type = 0
  97. piggyback = 0
  98. parse arg instr candidate
  99. if translate(instr) = 'ENCRYPT' then
  100.    do
  101.       call SysCls
  102.       say ''
  103.       encrypt = 1
  104.       call encry
  105.       exit
  106.    end
  107.  
  108. /* Initialize these (except yarnshell_ico).  These are files
  109. used by or created during installation */
  110. yd_doc = 'YD.DOC'            /* documentation file */
  111. readme_1st = 'README.1ST'        /* shorter one */
  112. ydparms_dat = 'YD_PARMS.DAT'    /* where we will store parameters */
  113. yd_cmd = 'YARNDIAL.CMD'        /* this is the YarnDial file we are installing for */
  114. ydinstl_cmd = 'YDINSTL.CMD'        /* and this is us, the installer */
  115. yarn_ico = 'YARN.ICO'            /* the Yarn icon (courtesy of C.T. Huang) */
  116. yarnshell_ico = yarn_ico        /* ...which we use more than once */
  117. yarndial_ico = 'YARNDIAL.ICO'    /* the YarnDial icon */
  118. ydfold1_ico = 'YDFOLD1.ICO'        /* for our desktop folder: icon for when it is closed */
  119. ydfold2_ico = 'YDFOLD2.ICO'        /* for our desktop folder: animated icon, folder when open */ 
  120. yarnutil_ico = 'YRNUTIL.ICO'        /* for yarnutil_cmd */ 
  121. logoff_ico = 'LOGOFF.ICO'        /* for logoff_cmd */ 
  122. renewzip_ico = 'RENEWZIP.ICO'    /* for renewzip_cmd */ 
  123. ydinstl_ico = 'YDINSTL.ICO'        /* for ydinstl_cmd */
  124.  
  125. if local_error_trapping then signal on failure
  126. if local_error_trapping then signal on halt
  127. if local_error_trapping then signal on syntax
  128. if local_error_trapping then signal on notready
  129. if local_error_trapping then signal on error
  130. if local_error_trapping then signal on novalue
  131.  
  132. Trace 'N'
  133.  
  134. call time 'R'
  135. yd_cmd_v = '2.0'
  136.  
  137. /*
  138. ============================
  139. We use Abandon=1 returned by a subroutine
  140. as a signal to abort.  We abort by making a
  141. conditional call to exit in the caller routine,
  142. example:     if Abandon then signal goodbye()
  143. ============================
  144. */
  145.    Abandon = 0
  146.  
  147. /* Completed flag will be set to 1 when we are done */
  148.    completed = 0
  149.  
  150. /* These are set to 1 or cleared for (certain) in-joy errors */
  151.    other_err = 0
  152.    ijparms_err1 = 0
  153.    ijparms_errmsg1 = ''
  154.    ijparms_err2 = 0
  155.    ijparms_errmsg2 = ''
  156.  
  157. /* We count file-search errors */
  158.    findfile_ErrNum = 0
  159.  
  160. /* if an error when we try to create objects, we set to  1 */
  161. object_creation_error = 0
  162.  
  163.  
  164. Upcase = xrange('A', 'Z')    /* Translation tables we use for going */
  165. Lowcase = xrange('a', 'z')    /* from upper to lower case */
  166.  
  167. parse source with this_pgm
  168. /* This program including path is last word.  Extract its
  169. path, stripping out a final \ */
  170.  
  171. this_pgm = word(this_pgm, words(this_pgm)) /* we are last word if more than one */
  172. source_drive = filespec('drive', this_pgm) /* get our drive...*/
  173. source_subdir = filespec('path', this_pgm) /* ...and dir */
  174. source_path = source_drive || source_subdir /* reconstruct path... */
  175. source_path = strip(source_path, 'T', '\')  /* ...removing terminal backslash */
  176. source_path = translate(source_path)    /* Looks prettier in upper case */
  177. x = SetLocal()
  178.  
  179. '@echo off'            /* do not echo OS/2 commands */
  180. call welcome_to_this_installer    /* big welcome message */
  181. call initialize_variables
  182.  
  183. /*
  184. =============
  185. Do we use the IAK Dialer, the Dial-Other-
  186. Internet-Providers utility, or a dialup string?
  187. =============
  188. */
  189. call get_connection_type
  190. call get_ini_paths        /* for dialer.ini and tcpos2.ini */
  191. call find_yarn_home_dir        /* set as an os/2 environment variable? or we can specify it */ 
  192. call find_yarn_dir        /* YARN, set as an os/2 environment variable */
  193.  
  194. /* read in some assignments from the Yarn CONFIG file */
  195. call get_parms_from_yarn_config
  196.  
  197. /*
  198. ============
  199. If connection_type = 4 or 5 we need to get dialer filename.
  200. Then, depending on dialer we chose, we can get our
  201. parameters from a previously set up SLIPPM entry
  202. or we ask to be prompted for them for keyboard entry.
  203.  
  204. The get_alt_dialer_exe routine gets the full path to
  205. the dialer, and also strips any options that may have been
  206. entered and then generates (except for slippm)
  207. alt_dialer_exe        fully qualified path and name
  208. alt_dialer_dir        drive and path part with final '\'
  209. alt_dialer_path        drive and path part without final '\'
  210. alt_dialer_name        filename without drive or path
  211. alt_dialer        file part of file.ext
  212.  
  213. alt_dialer_exe is not likely to be the IAKdialer which
  214. is covered by connection_type 1, nor is it likely to be
  215. PPP.EXE or SLIP.EXE either, both of which are covered by
  216. connection_type 3. 
  217. ==================
  218. */
  219. if pos(connection_type, '45') \= 0 then
  220.    do
  221.       call get_alt_dialer_exe
  222.  
  223.       select
  224.           when alt_dialer_exe = 'SLIPPM' | alt_dialer_exe = SLIPPM_EXE,
  225.            | alt_dialer = 'SLIPPM' then
  226.             do
  227.                alt_dialer_exe = SLIPPM_EXE
  228.                alt_dialer_name = SLIPPM_EXE
  229.                alt_dialer = 'SLIPPM'
  230.                alt_dialer_path = ''
  231.             end
  232.  
  233.          when alt_dialer_name \= SLIPPM_EXE,
  234.            & alt_dialer_name \= ILINK2_EXE then
  235.                call should_we_piggyback_on_slippm
  236.  
  237.          otherwise NOP
  238.       end    /* of Select */
  239.    end
  240.    
  241. if connection_type = 3 then
  242.    call should_we_piggyback_on_slippm
  243.  
  244. select    /* for different connection types */
  245.    when connection_type = 1 then
  246.       do
  247.          service = 'SLIP'
  248.         /* dialer.ini stores the IAK Dialer parameters... */
  249.          call get_parms_from_advantis_dialerini
  250.          call get_passw_POP3PWD
  251.          PWD = POP_PWD        /* for Advantis */
  252.         /* construct the dialup_string */
  253.          dialup_string ='''start' IAKdialer_exe || ''' account login_id pop_pwd'
  254.          alt_dialer_exe = translate(IAKdialer_exe)
  255.          alt_dialer_name = 'DIALER.EXE'
  256.          alt_dialer = 'DIALER'
  257.          alt_dialer_path = ''
  258.       end
  259.  
  260.    when pos(connection_type, '345') \= 0 then
  261.       do
  262.          if piggyback then
  263.             do
  264.                host_app = get_dial_other_providers_app(tcpos2_ini)
  265.                call get_parms_from_tcpos2ini
  266.                if alt_dialer = 'IN-JOY' then call get_injoy_parms
  267.             end
  268.          else
  269.             do
  270.                if alt_dialer = 'IN-JOY' then
  271.                   do
  272.                      call get_injoy_parms
  273.                   end
  274.                if alt_dialer \= 'IN-JOY' & \ijparms_err1 & \ijparms_err2 then
  275.                   do
  276.                      call get_dialer_app /* argument dialer uses to connect */
  277.                      call get_domain
  278.                      call get_login_id
  279.                      if alt_dialer = 'IN-JOY' then call get_interface_prefix
  280.                      call get_comport
  281.                   end
  282. /* These get prompted-for for all dialers if piggyback = 0 */
  283.                call get_userID
  284.                call are_we_SLIP_or_PPP
  285.                call get_nameservers
  286.                call get_pop3mail_server
  287.                call get_smtp_server
  288.                call get_news_server
  289.                call get_passw_POP3PWD
  290.                call get_passw_PWD
  291.             end    /* of else clause */
  292.       end        /* of Do, for "when pos(connection_type, '345') \= 0" */
  293.  
  294.     otherwise NOP
  295. end /* of select, for different connection types */
  296.  
  297. if connection_type = 3 & service = 'SLIP' then
  298.    do
  299.       alt_dialer_exe = 'SLIP.EXE'
  300.       alt_dialer_name = 'SLIP.EXE'
  301.       alt_dialer_path = ''
  302.       alt_dialer = 'SLIP'
  303.       dialup_string ='''start /c' alt_dialer_name || ''' **FILL IN REMAINDER...**'
  304.    end
  305. if connection_type = 3 & service = 'PPP' then
  306.    do
  307.       alt_dialer_exe = 'PPP.EXE'
  308.       alt_dialer_name = 'PPP.EXE'
  309.       alt_dialer_path = ''
  310.       alt_dialer = 'PPP'
  311.       dialup_string ='''start /c' alt_dialer_name || ''' **FILL IN REMAINDER...**'
  312.    end
  313.  
  314. if pos(connection_type, '45') \= 0 then 
  315.    select   /* different alt_dialer_name's */
  316.       when alt_dialer_name = SLIPPM_EXE then
  317.       do
  318.          dialup_string ='''start' slippm_exe || ''' host_app'
  319.       end
  320.  
  321.       when alt_dialer_name = ILINK2_EXE then
  322.       do
  323.          dialup_string = 'do;',
  324.            '''' || alt_dialer_drive || ''';',
  325.            '''cd' alt_dialer_dir || ''';',
  326.            '''start /N' alt_dialer_exe || ''' host_app;',
  327.            'end'
  328.       end
  329.  
  330.       when alt_dialer_name = 'SLIP.EXE' | alt_dialer_name = 'PPP.EXE' then
  331.       do
  332.          dialup_string ='''start' alt_dialer_name || ''' **FILL IN REMAINDER...**'
  333.       end
  334.       when alt_dialer_name = IAKDialer_exe then
  335.       do
  336.          service = 'SLIP'
  337.         /* dialer.ini stores the IAK Dialer parameters... */
  338.          call get_parms_from_advantis_dialerini
  339.          call get_passw_POP3PWD
  340.          PWD = POP_PWD        /* for Advantis */
  341.         /* construct the dialup_string */
  342.          dialup_string ='''start' IAKdialer_exe || ''' account login_id pop_pwd'
  343.          alt_dialer_exe = IAKdialer_exe
  344.       end
  345.  
  346.       when alt_dialer_name = INJOY_EXE then
  347.       do
  348.          dialup_string = 'do;',
  349.            '''' || alt_dialer_drive || ''';',
  350.            '''cd' alt_dialer_dir || ''';',
  351.            '''start /N' alt_dialer_exe || ''' host_app;',
  352.            'end'
  353.       end
  354.  
  355.  
  356.       otherwise    /* any other dialer not mentioned */
  357.       dialup_string = 'do;',
  358.         '''' || alt_dialer_drive || ''';',
  359.         '''cd' alt_dialer_dir || ''';',
  360.         '''start /N' alt_dialer_exe || ''' host_app;',
  361.         'end'
  362. end  /* of select for different alt_dialer_exe's */ 
  363.  
  364. if alt_dialer_name \= INJOY_EXE then
  365.    do
  366.       interf_prefix = service
  367.       if service = 'SLIP' then interf_prefix = 'SL'
  368.    end
  369.  
  370.  
  371. /* What kind of compression utilities? InfoZip's? PkWare's? others'? */
  372. call whose_zips_are_we_using
  373.  
  374. /* Do searches for files we need.  Gets full paths */
  375. call search_for_files
  376.  
  377. /* Tailor how you want souper to run: can modify some command-line options */
  378. call souper_options
  379.  
  380. /* Choice whether or not to allow connection to remain up after all
  381. transfers are completed (change in main YARNDIAL menu) */
  382. call enable_dnk_option
  383.  
  384. /* How many seconds before dialer times out (for connection_type 1, 2, and 3) */
  385. call get_dialer_timeout_wait
  386.  
  387. /* Set size of maximized window for yrnshell_cmd runs */
  388. call get_shell_windowsize
  389.  
  390. /* Up to this point, no changes have been made.  A chance
  391. to exit the install at this point without making any changes */
  392. call chance_to_quit
  393.  
  394. /* Create the YD_PARMS.DAT file where all our parameters go.
  395. YARNDIAL.CMD uses this file as a setup file */
  396. call output_dat
  397.  
  398. /* Copy files over from installation directory to home dir */
  399. call copy_ydfiles
  400.  
  401. /*
  402. ==============
  403. We create a suite of five customized REXX utilities on the HOME directory.
  404.  
  405. YARNSHELL.CMD:  Runs YARN.EXE from the correct environment for this user
  406.  
  407. YARNUTIL.CMD:  Run any yarn utility pgm for this user
  408.  
  409. RENEWZIP.CMD:  Restores the reply_packet .ZIP file (backed up during
  410.    an attempt to export) for a re-try later (RENEWZIP.CMD), again for this user
  411.  
  412. LOGOFF.CMD:  Provides a convenient way to log off
  413.  
  414. OBJECTS.CMD:  Restores a folder object and contents (objects for the four
  415. .CMD files above, plus an object for YarnDial.CMD, for this user installation
  416. ==============
  417. */
  418. call create_yarnshell_cmd
  419. call create_yarnutil_cmd
  420. call create_logoff_cmd
  421. call create_renewzip_cmd
  422. call create_yarndial_objects
  423.  
  424. /* Finally we create a Rexx pgm to recreate objects */
  425. call recreate_objects_cmd
  426. signal goodbye        /* cleanup and exit */
  427. EXIT
  428. /*
  429. ==============================================
  430. End of Main Program
  431. ==============================================
  432. */
  433.  
  434. /*
  435. ==============================================
  436. get_connection_type()
  437.  
  438. Are we installing for a connection to Advantis
  439. via the IAK Dialer
  440.    or
  441. a connection via either SLIP or PPP using the
  442. Dial-Other-Internet-Providers Utility?
  443. ==============================================
  444. */
  445. get_connection_type:
  446. edit_dialup_string_msg =  ''    /* initialize to a blank */
  447. call SysCls
  448. say ''
  449. say 'CONNECTION-TYPE SCREEN'
  450. say 'You must select the type of connection you will be making'
  451. say 'to your Internet Service Provider'
  452. say ''
  453. say 'How will you dial in to connect?'
  454. say '  1 With the IAK Internet Dialer to connect to Advantis (SLIP)'
  455. say '  2 (Reserved)'
  456. say '  3 With a slip.exe or ppp.exe dialup string'
  457. say '  4 Using SLIPPM (IBM''s Dial-Other-Internet-Providers Utility),'
  458. say '    a SLIPPM replacement dialer (e.g., ILINK/2, IN-JOY, etc.),'
  459. say '    or other dialer'
  460. say '  5 I will try to set up' ydparms_dat 'manually (read' yd_doc || '),'
  461. say '    but help me do a partial setup'
  462. say ''
  463. say ' FOR OPTIONS 3 and in some cases 4: the IBM utility SLIPPM.EXE'
  464. say ' (''Dial-Other-Internet-Providers'') may need to be configured'
  465. say ' properly beforehand even if you will use your own dialup string'
  466. say ' or another dialer to dial up.'
  467. say ' Reason: SLIPPM stores parameters that we need where we can'
  468. say ' get at them.'
  469. say ''
  470. do until pos(connection_type, '1345') \=0
  471.    say ''
  472.    prompt = 'Select 1, or 3-5, or Escape to quit:'
  473.    say prompt
  474.       parse value SysCurPos() with row col
  475.       row  = row - 1
  476.       col = length(prompt) + 2
  477.       call SysCurPos row, col
  478.    connection_type = SysGetKey('NOECHO')
  479.    if connection_type = escape then signal goodbye
  480. end
  481. say ''
  482.  
  483. if connection_type = 1 then
  484.    do
  485.       say 'Selected: IBM/Advantis IAK Dialer.          '
  486.    end     
  487.  
  488. if connection_type = 3 then
  489.    do
  490.       say 'Selected: Dialup with a ppp.exe or slip.exe dialup string'
  491.       edit_dialup_string_msg = crlf ||,
  492.       'Remember to fill in the dialup_string called',
  493.       'for in' ydparms_dat
  494.    end     
  495.  
  496. if connection_type = 4 then
  497.    do
  498.       say 'Selected: SLIPPM, a SLIPPM replacement, or other dialer.'
  499.    end     
  500.  
  501. if connection_type = 5 then
  502.    do
  503.       say 'Selected: Mostly manual configuration (by editing' ydparms_dat || ').'
  504.       edit_dialup_string_msg = crlf ||,
  505.       'Remember to manually revise (edit)' ydparms_dat
  506.    end     
  507.  
  508. say ''
  509. say 'Press any key to continue'
  510. call SysGetKey'ECHO'
  511. RETURN
  512.  
  513.  
  514. /*
  515. ==============================================
  516. Determine paths to DIALER.INI and TCPOS2.INI
  517. ==============================================
  518. */
  519. get_ini_paths:
  520. dialerini_exists = 0
  521. tcpos2ini_exists = 0
  522. tcpip_etc_path = value('etc', , 'OS2ENVIRONMENT')
  523. dialer_ini = tcpip_etc_path || '\' || 'dialer.ini'
  524. if stream(dialer_ini, 'c', 'query exists') \= 0 then
  525.    do
  526.       dialerini_exists = 1
  527.    end
  528. tcpos2_ini = tcpip_etc_path || '\' || 'tcpos2.ini'
  529. if stream(tcpos2_ini, 'c', 'query exists') \= 0 then
  530.    do
  531.       tcpos2ini_exists = 1
  532.    end
  533. RETURN
  534.  
  535. /*
  536. ==============================================
  537. Locate the Yarn HOME directory.  It  set as an
  538. OS/2 environmental variable, but if it isn't, prompt us
  539. for it.  You can install Yarn with separate home directories
  540. for each user.  A lot of other applications set up HOME
  541. as an environmental variable so the home directory in the
  542. OS/2 environment may not be the correct one for this
  543. installation.
  544.  
  545. To determine if we have the right home directory we look
  546. for Yarn's config file which is located in home's /yarn/
  547. subdirectory.
  548. ==============================================
  549. */
  550. find_yarn_home_dir:
  551. /* Get the Yarn Home Directory */
  552. entry = ''    /* initialize it to a blank */
  553.  
  554. call SysCls
  555. say ''
  556. say 'YARN''s HOME DIRECTORY SCREEN'
  557.  
  558. home = value('home', , 'OS2ENVIRONMENT')
  559. home = translate(home)
  560. yarn_config = home || '\yarn\config'
  561. if home = '' then
  562.    do
  563.       say ''
  564.       say 'Unable to find HOME as an OS/2 environment variable.'
  565.       say 'That means you did not include a SET HOME statement in'
  566.       say 'config.sys or you did not reboot after modifying config.sys,'
  567.       say 'neither of which is a problem since you will be able to'
  568.       say 'enter the path for your HOME directory now.'
  569.       say ''
  570.    end
  571. if stream(yarn_config, 'c', 'query exists') \= '' then
  572.    do
  573.       say ''
  574.       say 'We found' home 'as a possible YARN home directory.'
  575.       say ''
  576.       say 'You may have set up Yarn with more than one user'
  577.       say 'and more than one home directory or this '
  578.       say 'another program''s home directory.'
  579.       say ''
  580.       say 'To accept   ' home '   as the home directory press ENTER,'
  581.       say 'or key in the full path of the Yarn HOME directory you wish'
  582.       prompt = 'to do this installation for:'
  583.          say prompt
  584.          parse value SysCurPos() with row col
  585.          row  = row - 1
  586.          col = length(prompt) + 2
  587.          call SysCurPos row, col
  588.       parse upper pull entry
  589.    end 
  590. if entry \= '' then home = entry
  591. home = strip(home, 'B')
  592. yarn_config = home || '\YARN\CONFIG'
  593. do forever
  594.    if stream(yarn_config, 'c', 'query exists') \= '' then
  595.       do
  596.          leave
  597.       end
  598.          say ''
  599.          if home = '' then say 'The home directory is undefined.'
  600.          if home \= '' then
  601.             do
  602.                say ''
  603.                say 'Unable to find' yarn_config '(HOME dir is in error)'
  604.                say translate(home) 'as HOME directory is in error.'
  605.             end
  606.          prompt = 'Enter your Yarn HOME directory path now:'
  607.          say prompt
  608.             parse value SysCurPos() with row col
  609.             row  = row - 1
  610.             col = length(prompt) + 2
  611.         call SysCurPos row, col
  612.         pull entry
  613.         entry = strip(entry, 'T', '\')    /* strip any trailing \ if entered */
  614.         home = entry
  615.         yarn_config = home || '\yarn\CONFIG'
  616. end
  617.  
  618. yarn_config = home || '\yarn\CONFIG'
  619. yarn_config = translate(yarn_config)
  620. home_drive = filespec('drive', yarn_config)
  621. home_drive = translate(home_drive)
  622. ydparms_dat = home || '\' || ydparms_dat
  623. ydparms_dat = translate(ydparms_dat)
  624.  
  625. say ''
  626. say 'Installing for' home 'as the Yarn HOME directory.'
  627. say ''
  628. say ''
  629. say 'OK.  Press any key to continue'
  630. call SysGetKey 'NOECHO'
  631. RETURN
  632.  
  633. /*
  634. ==============================================
  635. Where is the Yarn directory?
  636.  
  637. We look for yarn in the OS/2 environment.  If we don't
  638. find it we exit install.  All of the yarn files should
  639. be there:
  640.    import.exe
  641.    export.exe
  642.    rebuild.exe
  643.    expire.exe
  644.    yarn.exe      and more
  645. but we search for yarn.exe to verify it is (probably)
  646. a valid YARN directory.
  647. ==============================================
  648. */
  649.  
  650. find_yarn_dir:
  651. /* Get the Yarn Directory */
  652. entry = ''    /* initialize it to a blank */
  653.  
  654. call SysCls
  655. say ''
  656. say 'YARN DIRECTORY SCREEN'
  657. say '(Directory where most of the YARN programs are kept)'
  658. say ''
  659.  
  660. yarn = value('yarn', , 'OS2ENVIRONMENT')
  661. yarn = translate(yarn)
  662. yarn_exe = yarn || '\' || yarn_exe
  663. if yarn = '' then
  664.    do
  665.       say ''
  666.       say 'Unable to find YARN as an OS/2 environment variable.'
  667.       say 'That means you did not include a SET YARN statement in'
  668.       say 'config.sys or you did not reboot after modifying config.sys,'
  669.       say 'neither of which is a problem since you will be able to'
  670.       say 'enter the path for your YARN directory now.'
  671.       say ''
  672.    end
  673. if stream(yarn_exe, 'c', 'query exists') \= '' then
  674.    do
  675.       say ''
  676.       say 'We found' yarn 'as a possible YARN directory.'
  677.       say ''
  678.       say 'You may have set up Yarn with more than one YARN'
  679.       say 'directory or this  a temporary directory'
  680.       say 'you used to install YARN.'
  681.       say ''
  682.       say 'To accept   ' yarn '   as the YARN directory press ENTER,'
  683.       say 'or key in the full path of the YARN directory you wish'
  684.       prompt = 'to do this installation for:'
  685.          say prompt
  686.          parse value SysCurPos() with row col
  687.          row  = row - 1
  688.          col = length(prompt) + 2
  689.          call SysCurPos row, col
  690.       parse upper pull entry
  691.    end 
  692. if entry \= '' then yarn = entry
  693. yarn = strip(yarn, 'B')
  694. yarn_exe = filespec('name', yarn_exe)    /* get back to name only */
  695. yarn_exe = yarn || '\' || yarn_exe    /* reconstruct fully qualified path */
  696.  
  697. do forever
  698.    if stream(yarn_exe, 'c', 'query exists') \= '' then
  699.       do
  700.          leave
  701.       end
  702.          say ''
  703.          say 'Unable to find' yarn_exe '(YARN dir is in error or undefined)'
  704.          say ''
  705.          if yarn \= '' then
  706.             do
  707.                say translate(yarn) 'as YARN directory is in error'
  708.             end
  709.          prompt = 'Enter correct YARN directory path now:'
  710.          say prompt
  711.             parse value SysCurPos() with row col
  712.             row  = row - 1
  713.             col = length(prompt) + 2
  714.         call SysCurPos row, col
  715.         pull entry
  716.         entry = strip(entry, 'T', '\')    /* strip any trailing \ if entered */
  717.         yarn = entry
  718.         yarn_exe = filespec('name', yarn_exe)    /* get back to name only */
  719.         yarn_exe = yarn || '\' || yarn_exe        /* this is what we look for */
  720. end
  721.  
  722. yarn_exe = yarn || '\' || yarn_exe        /* this is what we look for */  
  723. yarn_exe = translate(yarn_exe)
  724. yarn_drive = filespec('drive', yarn_exe)
  725. yarn_drive = translate(yarn_drive)
  726. yarn_path = yarn || '\'
  727. home_path = home || '\'
  728. yarn_exe = filespec('name', yarn_exe)  /* OK, again get back to name only */
  729.  
  730. souper_exe = yarn_path || souper_exe
  731. yarn_exe = yarn_path || yarn_exe
  732. import_exe = yarn_path || import_exe
  733. export_exe = yarn_path || export_exe
  734. expire_exe = yarn_path || expire_exe
  735. rebuild_exe = yarn_path || rebuild_exe
  736. go_exe = home_path || go_exe
  737. yarn_drive = filespec('drive', import_exe)
  738.  
  739. say ''
  740. say 'Installing for' yarn 'as the YARN directory.'
  741. say ''
  742. say ''
  743. say 'OK.  Press any key to continue'
  744. call SysGetKey 'NOECHO'
  745. if connection_type = 1 then say 'Password module loading...'
  746. RETURN
  747.  
  748. /*
  749. ==============================================
  750. get_dial_other_providers_app()
  751.  
  752. If you are making a PPP or SLIP connection using the
  753. Dial-Other-Internet-Providers utility, we will have your
  754. "application" (i.e., the setup you did for your provider
  755. in the tcpos2.ini file.  Here you can select which
  756. application you are installing for.  Be careful, there
  757. are "applications" here that are not related to a
  758. specific provider setup.
  759. ==============================================
  760. */
  761. get_dial_other_providers_app:
  762. arg inifile
  763. call SysCls
  764. say ''
  765. say 'DIAL-OTHER-INTERNET-PROVIDERS SCREEN'
  766. say ''
  767. result = SysIni(inifile, 'ALL:', 'apps')
  768. if result \= 'ERROR:' then
  769.    do j = 1 to apps.0
  770.       say j apps.j
  771.       if j \= 0 & j // 15 = 0 then
  772.          do
  773.             say '   There are more, press any key to continue'
  774.             say '   If one of these is the right one, remember the number!!!'
  775.             call SysGetKey 'NOECHO'
  776.          end
  777.    end
  778. say ''
  779. say '     Select the item above by number which'
  780. say '     is the Dial-Other-Internet-Provider application for'
  781. say '     this installation.'
  782. say ''
  783.  
  784. do until DataType(DOIP, 'W') & DOIP > 0 & DOIP < j
  785.    prompt = 'Selection:' 
  786.    say prompt
  787.       parse value SysCurPos() with row col
  788.       row  = row - 1
  789.       col = length(prompt) +2
  790.       call SysCurPos row, col
  791.    parse pull DOIP
  792.    if \DataType(DOIP, 'W') | DOIP <1 | DOIP > j-1 then
  793.    do
  794.       say 'Must be 1-' || j-1
  795.    end
  796. end
  797. say ''
  798. say 'Selected Application:' apps.DOIP
  799. say ''
  800. say ''
  801. say 'Press any key to continue'
  802. call SysGetKey 'NOECHO'
  803. say 'Please wait while parameters are being loaded...'
  804. RETURN apps.DOIP
  805.  
  806. /*
  807. ==============================================
  808. whose_zips_are_we_using()
  809.  
  810. You can select which kind of compression and
  811. uncompress utilities you use.  The os/2 InfoZip
  812. ports are recommended.
  813. ==============================================
  814. */
  815. whose_zips_are_we_using:
  816. /* Get path to zip files, also specify which we use */
  817. zip_type = 0
  818. call SysCls
  819.    say ''
  820.    say 'COMPRESSION/UNCOMPRESSION SCREEN'
  821.    say ''
  822.    say 'Select which type of compress and uncompress programs'
  823.    say 'you will use.  You must use them.  Recommended is the OS/2'
  824.    say 'port of InfoZip compression and uncompression programs.  You'
  825.    say 'can also select to use the MS-DOS PkWare programs.'
  826.    say ''
  827.    say 'Select from among:'
  828.    say '1  OS/2 InfoZip series (e.g., from zip201c2.zip and unz512x2.zip'
  829.    say '   archives, or later versions)'
  830.    say '2  MS-DOS PkWare (e.g., from the PKZ204G.ZIP archive)'
  831.    say '3  Any other type, whether OS/2 or MS-DOS based'
  832.    say '(ESC exits install program now)'
  833. do until pos(zip_type, '123') \= 0
  834.    prompt = 'Select 1, 2, or 3:'
  835.    say prompt
  836.    zip_type = SysGetKey('NOECHO')
  837.    select
  838.       when zip_type = Escape then signal goodbye
  839.       when zip_type = 1 then
  840.          do
  841.             say ''
  842.             file_msg1 = 'OS/2 InfoZip' /* This is the default */
  843.             say 'Selected: ' file_msg1
  844.             zip_exe = os2_zip_exe
  845.             zip_options = os2_zip_options
  846.             unzip_exe = os2_unzip_exe
  847.             unzip_options = os2_unzip_options
  848.          end
  849.       when zip_type = 2 then
  850.          do
  851.             say ''
  852.             file_msg1 = 'MS-DOS PkWare'
  853.             say 'Selected: ' file_msg1
  854.             zip_exe = msdos_zip_exe
  855.             zip_options = msdos_zip_options
  856.             unzip_exe = msdos_unzip_exe
  857.             unzip_options = msdos_unzip_options
  858.          end
  859.       when zip_type = 3 then
  860.          do
  861.             zip_exe = ''
  862.             unzip_exe = ''
  863.             say ''
  864.             say 'Selected: (OTHER)'
  865.             say 'You will need to edit the zip_exe and unzip_exe entries'
  866.             say 'in' ydparms_dat 'after installation is complete.'
  867.             say 'Refer to' yd_doc 'for help on how to customize for'
  868.             say 'other compression and uncompression utilities.'
  869.          end
  870.       when pos(zip_type, '123') = 0 then
  871.          do
  872.             say ''
  873.             say ''
  874.             say 'You may only enter 1,2 or 3 (or press ESC to quit)'
  875.             say ''
  876.          end
  877.       otherwise NOP
  878.    end
  879. end
  880. say ''
  881. say ''
  882. say 'Press any key to continue'
  883. call SysGetKey 'NOECHO'
  884. RETURN
  885.  
  886. /*
  887. =====================================      
  888. search_for_files()
  889.  
  890. We search for various files with calls to the
  891. file_locator() routine.  In the case of the zip and
  892. unzip files, we also attach their option strings.
  893. =====================================      
  894. */
  895.  
  896. search_for_files:
  897. /* The flag Abandon is returned = 1 if the file_locator() routine encounters a request to abort */
  898.  
  899. zip_exe = file_locator(zip_exe)
  900. if Abandon then signal goodbye
  901. unzip_exe = file_locator(unzip_exe)
  902. if Abandon then signal goodbye
  903. zip_exe = zip_exe zip_options
  904. unzip_exe = unzip_exe unzip_options
  905.  
  906. souper_exe = file_locator(souper_exe)
  907. if Abandon then signal goodbye
  908.  
  909.       if stream(alt_dialer_path || killjoy_exe, 'c', 'query exists') \= '' then
  910.             killjoy_exe = stream(alt_dialer_path || killjoy_exe, 'c', 'query exists')
  911.  
  912. say 'Patience...'  /* sometimes the next step takes a while to load */
  913. RETURN
  914.  
  915. /*
  916. =====================================================
  917. file_locator()
  918.  
  919. is a file finder that not only searches all available
  920. local drives for all instances found of that file, but
  921. provides a menu allowing you to select a single instance.
  922. If the filename being searched for has been fed to the
  923. routine with arguments or with a fully qualified path,
  924. the path and all arguments are stripped out so only
  925. the pure filename itself is searched.
  926.  
  927.  
  928. Syntax: file_locator(filename)
  929.  
  930. Returns the fully qualified path of the instance you
  931. select if at least one instance is found, or returns
  932. a blank ('') if none is found.  If only one instance
  933. is found, it is automatically selected (you get no
  934. menu, but you do get a 'found' notice).
  935.  
  936. =====================================================
  937. */
  938. file_locator:
  939. parse upper arg filename
  940.  
  941. escape = d2c(27)             /* escape character */
  942. file_spec = filespec('name', filename)
  943. call SysCls
  944. say ''
  945. say ''
  946. say ''
  947. say ''
  948. say 'Searching for' file_spec
  949. say ''
  950. say 'Search is restricted to local drives only.'
  951. say 'Remove media from local CD-ROM drives and other'
  952. say 'removable-media drives or we will search them, too.'
  953. say ''
  954.  
  955. map = SysDriveMap( , 'LOCAL')
  956. drives = words(map)
  957. instances = 0
  958. do i = 1 to drives
  959.    drive.i = word(map, i)
  960.    if SysDriveInfo(drive.i) = '' then iterate
  961.    prompt = 'Searching' drive.i
  962.    say prompt
  963.       parse value SysCurPos() with row col
  964.       row  = row - 1
  965.       col = 0
  966.       call SysCurPos row, col
  967.    filsp = drive.i || '\' || file_spec    /* filespec with path */
  968.    rc = SysFileTree(filsp, 'file', 'FS')
  969.    do n = 1 to file.0
  970.       instances = instances + 1            /* a counter */
  971.       file_found.instances = file.n
  972.    end
  973. end
  974.  
  975. /*
  976. ==================
  977. If instances=0, that means we found no instance(s)
  978. of the file.  Maybe the file name is changed.  Error
  979. message.  But we continue the install because maybe
  980. the filename can be corrected by editing YD_PARMS.DAT
  981. when we are done
  982. =================
  983. */
  984. if instances = 0 then
  985.    do
  986.       findfile_ErrNum = findfile_ErrNum +1
  987.       call  beep 262, 200
  988.       say ''
  989.       say ''
  990.       say 'MAJOR ERROR:  we found no instances of' file_spec || '.'
  991.       say 'Maybe the file name has been changed.  We can'
  992.       say 'continue, hoping the error can be corrected by'
  993.       say 'by editing the name in the' ydparms_dat
  994.       say 'file that we create in the specific HOME directory'
  995.       say 'that we are installing to.'
  996.       say ''
  997.       say 'Or you can Escape and correct now (recommended).'
  998.       say ''
  999.    
  1000. /* This next line is for possible use in an error message
  1001. identifying this file which we can't find. */
  1002.  
  1003.       unfound_file.findfile_ErrNum = file_spec
  1004.       file_spec.instances = ''
  1005.       file_spec.instance_number = file_spec
  1006.       prompt = 'Escape quits YDINSTL.  Any other key continues'
  1007.       say prompt
  1008.          parse value SysCurPos() with row col
  1009.          row  = row - 1
  1010.          col = length(prompt) + 2
  1011.          call SysCurPos row, col
  1012.          if SysGetKey('NOECHO') = escape then Abandon = 1
  1013.    end
  1014.  
  1015. if instances > 1 | instances = 1 then    /* We list them all */
  1016.    do      
  1017.       say ''
  1018.       prompt = 'Found:  ' instances 'instance(s) of' file_spec
  1019.          parse value SysCurPos() with row col
  1020.          row  = row -1
  1021.          col = 0
  1022.          call SysCurPos row, col
  1023.       if instances > 1 then say prompt
  1024.       do i = 1 to instances
  1025.          parse var file_found.i date.i time.i size.i attrib.i file_spec.i
  1026.          date.i = right(date.i, 9)
  1027.          time.i = right(time.i, 7)
  1028.          size.i = right(size.i, 10)
  1029.          file_spec.i = strip(file_spec.i, 'B')
  1030.          if instances > 1 then say i date.i time.i size.i file_spec.i
  1031.          if i \= 0 & i // 15 = 0 & instances > 1 then
  1032.          do
  1033.             say '   There are more, press any key to continue'
  1034.             say '   If one of these is the right one, remember the number!!!'
  1035.             call SysGetKey 'NOECHO'
  1036.          end
  1037.       end       /* of Do i = 1 to instances */
  1038.    end          /* if instances > 1 | instances = 1 */
  1039.  
  1040. if instances > 1 then    /* We prompt for which one to select */
  1041.  
  1042.    do until DataType(instance_number,'W') &,
  1043.          instance_number < instances + 1,
  1044.          & instance_number > 0
  1045.       say 'Which is the correct one of these to use?'
  1046.       prompt = 'Enter 1-' || instances || ':' 
  1047.       say prompt
  1048.       parse value SysCurPos() with row col
  1049.          row  = row -1
  1050.          col = length(prompt) +2
  1051.          call SysCurPos row, col
  1052.       if instances > 1 then
  1053.          do
  1054.             pull instance_number
  1055.             if \DataType(instance_number, 'W') then
  1056.                do
  1057.                   say 'Whole number only. Try Again.'
  1058.                end
  1059.             if instance_number > instances then
  1060.                do
  1061.                   say 'Cannot exceed' instances || '.  Try again.'
  1062.                end
  1063.             if instance_number = 0 then
  1064.                do
  1065.                   say 'Cannot enter zero.  Try again.'
  1066.                end
  1067.          end
  1068.    end
  1069.  
  1070. /* If only one instance, we do not need
  1071. to prompt or select the menu number because
  1072. instance_number is 1.  */
  1073.  
  1074. if instances = 1 then
  1075.    do
  1076.       instance_number = 1
  1077.       say 'Found and selected one instance:'
  1078.       say date.1 time.1 size.1 file_spec.1
  1079.    end
  1080.  
  1081. if instances > 1 then say 'Selected:  ' file_spec.instance_number
  1082.  
  1083. if instances = 1 | instances > 1 then
  1084.    do
  1085.       say ''
  1086.       say 'Press any key to continue'
  1087.       call SysGetKey 'NOECHO'
  1088.       say ''
  1089.    end
  1090. say ''
  1091. say ''
  1092. file_selected = file_spec.instance_number
  1093. RETURN file_selected
  1094.  
  1095. /*
  1096. ==============================================
  1097. get_parms_from_yarn_config()
  1098.  
  1099. Read the yarn config file.  Reconstitute lines that
  1100. have been continued on to the next line using
  1101. the \ continuation character, then pick out lines
  1102. with an = sign and that don't begin with the #
  1103. comment-out character.  Then set up the USER and
  1104. REPLY_PACKET variables.
  1105. ==============================================
  1106. */
  1107. get_parms_from_yarn_config:
  1108. n = 1
  1109. do while lines(yarn_config) > 0
  1110.     data_line = linein(yarn_config)
  1111.     line.n = data_line
  1112.     if pos('=', data_line) > 0 & \abbrev(line.n, '#') then
  1113.        do
  1114.           line.n = data_line
  1115.           if right(line.n, 1) = '\' then
  1116.              do until right(line.n, 1) \= '\'
  1117.                 line_n_with_right_slash_stripped = strip(right(line.n,1), 'T', '\')
  1118.                 next_data_line = linein(yarn_config)
  1119.                 line.n = line_n_with_right_slash_stripped || next_data_line
  1120.              end
  1121.           n = n + 1
  1122.           number_of_reconstituted_lines = n
  1123.       end
  1124. end
  1125.  
  1126. j = 1
  1127. do until j = number_of_reconstituted_lines
  1128.    parse var line.j first.j '=' last.j
  1129.    do until first.j = stripped_F.j & last.j = stripped_L.j
  1130.       stripped_F.j = strip(first.j, 'B')
  1131.       first.j = strip(stripped_F.j, 'B', tab)
  1132.       stripped_L.j = strip(last.j, 'B')
  1133.       last.j = strip(stripped_L.j, 'B', tab)
  1134.    end
  1135.  
  1136.    select
  1137.       when abbrev(line.j, '#') then NOP
  1138.       when translate(first.j) = 'USER' then user = last.j
  1139.       when translate(first.j) = 'HOST' then host = last.j
  1140.       when translate(first.j) = 'REPLY-PACKET' then reply_packet = last.j
  1141.       otherwise NOP
  1142.    end
  1143.    j = j +1
  1144. end
  1145.  
  1146. LOGIN_ID = user
  1147. RETURN
  1148.  
  1149. /*
  1150. ==============================================
  1151. get_parms_from_advantis_dialerini()
  1152.  
  1153. Get selected parameters from dialer.ini (for the
  1154. Advantis IAK Dialer) for the application "user_user".
  1155. Example, my user ID is jlevy so for me user_user
  1156. is user_jlevy (all lower case) 
  1157. ==============================================
  1158. */
  1159. get_parms_from_advantis_dialerini:
  1160. /* Get parms from dialer.ini file.  The strip is of a final null character that for some reason gets fetched along with the parm */
  1161. user_user = 'user_' || user
  1162.    Upcase = xrange('A', 'Z')
  1163.    Lowcase = xrange('a', 'z')
  1164.    user_user = translate(user_user, Lowcase, Upcase) /* dialer.ini expects user_user to be all-lowercase */
  1165. account = strip(SysIni(dialer_ini, user_user, 'act'), 'T', X1)
  1166. DEFAULT_NEWS = strip(SysIni(dialer_ini, user_user, 'ns'), 'T', X1)
  1167. POPSRVR = strip(SysIni(dialer_ini, user_user, 'ps'), 'T', X1)
  1168. MAIL_GW = strip(SysIni(dialer_ini, user_user, 'sm'), 'T', X1)
  1169. connect_logfile = strip(SysIni(dialer_ini, 'AdvLog', 'Cfn'), 'T', X1)
  1170. ask = strip(SysIni(dialer_ini, user_user, 'ask'), 'T', X1)
  1171. DEFAULT_GOPHER = strip(SysIni(dialer_ini, user_user, 'gs'), 'T', X1)
  1172. DEFAULT_WWW = strip(SysIni(dialer_ini, user_user, 'ws'), 'T', X1)
  1173. DNS = strip(SysIni(dialer_ini, user_user, 'dn1'), 'T', X1)
  1174. DNS2 = strip(SysIni(dialer_ini, user_user, 'dn2'), 'T', X1)
  1175. is1 = strip(SysIni(dialer_ini, user_user, 'is1'), 'T', X1)
  1176. is2 = strip(SysIni(dialer_ini, user_user, 'is2'), 'T', X1)
  1177. rs1 = strip(SysIni(dialer_ini, user_user, 'rs1'), 'T', X1)
  1178. rs2 = strip(SysIni(dialer_ini, user_user, 'rs2'), 'T', X1)
  1179. fs1 = strip(SysIni(dialer_ini, user_user, 'fs1'), 'T', X1)
  1180. fs2 = strip(SysIni(dialer_ini, user_user, 'fs2'), 'T', X1)
  1181. DOMAIN_NAME = strip(SysIni(dialer_ini, user_user, 'md'), 'T', X1)
  1182. pin = strip(SysIni(dialer_ini, user_user, 'pin'), 'T', X1)
  1183. POP_ID = strip(SysIni(dialer_ini, user_user, 'emI'), 'T', X1)
  1184. RETURN
  1185.  
  1186. /*
  1187. ==============================================
  1188. get_parms_from_tcpos2ini()
  1189.  
  1190. Similarly, get the parameters (all of them) for the
  1191. Dial-Other-Internet-Providers "application" you had
  1192. selected when the GET_DIAL_OTHER_PROVIDERS_APP()
  1193. routine was run.
  1194.  
  1195. These are located in the TCPOS2.INI file.  Xi is the
  1196. null character.  It is returned with every value and
  1197. we strip it out
  1198. ==============================================
  1199. */
  1200. get_parms_from_tcpos2ini:
  1201. /* Get parms from tcpos2.ini file in the same way. */
  1202. PROVIDER = strip(SysIni(tcpos2_ini, host_app, 'PROVIDER'), 'T', X1)
  1203. LOGIN_ID = strip(SysIni(tcpos2_ini, host_app, 'LOGIN_ID'), 'T', X1)
  1204. PWD = strip(SysIni(tcpos2_ini, host_app, 'PWD'), 'T', X1)
  1205. SAVE_PWD = strip(SysIni(tcpos2_ini, host_app, 'SAVE_PWD'), 'T', X1)
  1206. PHONE_NUMBER = strip(SysIni(tcpos2_ini, host_app, 'PHONE_NUMBER'), 'T', X1)
  1207. HANGUP = strip(SysIni(tcpos2_ini, host_app, 'HANGUP'), 'T', X1)
  1208. SCRIPT = strip(SysIni(tcpos2_ini, host_app, 'SCRIPT'), 'T', X1)
  1209. SERVICE = strip(SysIni(tcpos2_ini, host_app, 'SERVICE'), 'T', X1)
  1210. YOURIP = strip(SysIni(tcpos2_ini, host_app, 'YOURIP'), 'T', X1)
  1211. DESTIP = strip(SysIni(tcpos2_ini, host_app, 'DESTIP'), 'T', X1)
  1212. NETMASK = strip(SysIni(tcpos2_ini, host_app, 'NETMASK'), 'T', X1)
  1213. MTU_SIZE = strip(SysIni(tcpos2_ini, host_app, 'MTU_SIZE'), 'T', X1)
  1214. VJ_COMP = strip(SysIni(tcpos2_ini, host_app, 'VJ_COMP'), 'T', X1)
  1215. PRIMARY_INF = strip(SysIni(tcpos2_ini, host_app, 'PRIMARY_INF'), 'T', X1)
  1216. HOSTNAME = strip(SysIni(tcpos2_ini, host_app, 'HOSTNAME'), 'T', X1)
  1217. DOMAIN_NAME = strip(SysIni(tcpos2_ini, host_app, 'DOMAIN_NAME'), 'T', X1)
  1218. DNS = strip(SysIni(tcpos2_ini, host_app, 'DNS'), 'T', X1)
  1219. DEFAULT_NEWS = strip(SysIni(tcpos2_ini, host_app, 'DEFAULT_NEWS'), 'T', X1)
  1220. DEFAULT_WWW = strip(SysIni(tcpos2_ini, host_app, 'DEFAULT_WWW'), 'T', X1)
  1221. DEFAULT_GOPHER = strip(SysIni(tcpos2_ini, host_app, 'DEFAULT_GOPHER'), 'T', X1)
  1222. MAIL_GW = strip(SysIni(tcpos2_ini, host_app, 'MAIL_GW'), 'T', X1)
  1223. POPSRVR = strip(SysIni(tcpos2_ini, host_app, 'POPSRVR'), 'T', X1)
  1224. REPLY_DOMAIN = strip(SysIni(tcpos2_ini, host_app, 'REPLY_DOMAIN'), 'T', X1)
  1225. REPLY_ID = strip(SysIni(tcpos2_ini, host_app, 'REPLY_ID'), 'T', X1)
  1226. POP_ID = strip(SysIni(tcpos2_ini, host_app, 'POP_ID'), 'T', X1)
  1227. POP_PWD = strip(SysIni(tcpos2_ini, host_app, 'POP_PWD'), 'T', X1)
  1228. MODEM_TYPE = strip(SysIni(tcpos2_ini, host_app, 'MODEM_TYPE'), 'T', X1)
  1229. COMPORT = strip(SysIni(tcpos2_ini, host_app, 'COMPORT'), 'T', X1)
  1230. BAUD = strip(SysIni(tcpos2_ini, host_app, 'BAUD'), 'T', X1)
  1231. DATABITS = strip(SysIni(tcpos2_ini, host_app, 'DATABITS'), 'T', X1)
  1232. PARITY = strip(SysIni(tcpos2_ini, host_app, 'PARITY'), 'T', X1)
  1233. DIAL_MODE = strip(SysIni(tcpos2_ini, host_app, 'DIAL_MODE'), 'T', X1)
  1234. PREFIX = strip(SysIni(tcpos2_ini, host_app, 'PREFIX'), 'T', X1)
  1235. PREFIX_ANS = strip(SysIni(tcpos2_ini, host_app, 'PREFIX_ANS'), 'T', X1)
  1236. INIT = strip(SysIni(tcpos2_ini, host_app, 'INIT'), 'T', X1)
  1237. INIT2 = strip(SysIni(tcpos2_ini, host_app, 'INIT2'), 'T', X1)
  1238. DISABLE = strip(SysIni(tcpos2_ini, host_app, 'DISABLE'), 'T', X1)
  1239. DISABLE_SEQ = strip(SysIni(tcpos2_ini, host_app, 'DISABLE_SEQ'), 'T', X1)
  1240. DIAL_PREFIX = strip(SysIni(tcpos2_ini, host_app, 'DIAL_PREFIX'), 'T', X1)
  1241. AUTOSTART = strip(SysIni(tcpos2_ini, host_app, 'AUTOSTART'), 'T', X1)
  1242. TOTAL_CONNECT = strip(SysIni(tcpos2_ini, host_app, 'TOTAL_CONNECT'), 'T', X1)
  1243.  
  1244. service = translate(service)
  1245.  
  1246. /* If no DNS2 is available, set DNS2 = DNS */
  1247. DNS = strip(DNS, 'B')
  1248. DNS = strip(DNS, 'B', tab)
  1249. if DNS2 = '' then DNS2 = DNS
  1250.  
  1251. RETURN
  1252.  
  1253.  
  1254. /*
  1255. ==============================================
  1256. get_alt_dialer_exe()
  1257.  
  1258. Prompt for this and verify
  1259. ==============================================
  1260. */
  1261.  
  1262. get_alt_dialer_exe:
  1263.  
  1264. call SysCls
  1265. say ''
  1266. say 'THIS IS THE "IDENTIFY-YOUR-DIALER" SCREEN'
  1267. say ''
  1268. do until pos(dialer_selection, '1239') \= 0
  1269.    say 'Select:'
  1270.    say '1  SLIPPM (IBM''s Dial-Other-Internet-Providers Utility)'
  1271.    say '2  The ILINK/2 Dialer'
  1272.    say '3  The IN-JOY Dialer'
  1273.    say '4-8 (Reserved for future use)'
  1274.    say '9  Not listed and not a SLIP.EXE or PPP.EXE dialup string,'
  1275.    say '     so prompt me to enter the dialer filename'
  1276.  
  1277.    say ''
  1278.    prompt = 'Enter 1-3 or 9:'
  1279.    say ''
  1280.    say prompt
  1281.       parse value SysCurPos() with row col
  1282.       row  = row - 1
  1283.       col = length(prompt) + 2
  1284.       call SysCurPos row, col
  1285.    dialer_selection = SysGetKey('ECHO')
  1286.    say ''
  1287.    if dialer_selection = 1 then
  1288.       do
  1289.          piggyback = 1  /* get parms from tcpos2.ini */
  1290.          say 'Selected:  SLIPPM Dialer'
  1291.          alt_dialer_exe = SLIPPM_EXE
  1292.          alt_dialer_name = 'SLIPPM'
  1293.          alt_dialer = 'SLIPPM'
  1294.          say ''
  1295.          say 'Press any key to continue'
  1296.          call SysGetKey 'NOECHO'
  1297.       end
  1298.  
  1299.    if dialer_selection = 2 then
  1300.       do
  1301.          piggyback = 1  /* get parms from tcpos2.ini */
  1302.          say 'Selected:  ILINK/2 Dialer'
  1303.          alt_dialer_exe = ILINK2_EXE
  1304.          say ''
  1305.          say 'Press any key to continue'
  1306.          call SysGetKey 'NOECHO'
  1307.          call locate_alt_dialer_exe
  1308.       end
  1309.    if dialer_selection = 3 then
  1310.       do
  1311.          say 'Selected:  IN-JOY Dialer'
  1312.          alt_dialer_exe = INJOY_EXE
  1313.          say ''
  1314.          say 'Press any key to continue'
  1315.          call SysGetKey 'NOECHO'
  1316.          call locate_alt_dialer_exe
  1317.       end
  1318.  
  1319.    if pos(dialer_selection, '1239') = 0 then
  1320.       say 'Must enter 1-3 or 9.  Try again'
  1321.    say ''
  1322. end
  1323.  
  1324. if dialer_selection = 9 then
  1325.    do
  1326.       say ''
  1327.       say 'You chose to enter the dialer name.'
  1328.       alt_dialer_exe = ''
  1329.       say 'Enter the name of your dialer executable,'
  1330.       say 'complete with filetype.  Omit path.'
  1331.       say 'Examples: slippm.exe, ilink2.exe, in-joy.exe, etc.'
  1332.       say ''
  1333.       info_entered = ''
  1334.       match_info_entered = ''
  1335.       prompt = 'Dialer filename with extension (no path):'
  1336.       call prompt_for_info
  1337.       alt_dialer_exe = info_entered
  1338.       say 'Dialer is' alt_dialer_exe
  1339.       say ''
  1340.       say 'Press any key to continue'
  1341.       call SysGetKey 'NOECHO'
  1342.       call locate_alt_dialer_exe
  1343.    end
  1344. RETURN
  1345.  
  1346. /*
  1347. ==================
  1348. locate_alt_dialer_exe()
  1349.  
  1350. Find the alt_dialer_exe, and from that fully qualified path
  1351. to it get drive, path, filename stripped of file and path,
  1352. and file part of file.exe
  1353. ==================
  1354. */
  1355.  
  1356. locate_alt_dialer_exe:
  1357. alt_dialer_exe = file_locator(alt_dialer_exe)
  1358.    if Abandon then signal goodbye
  1359.  
  1360. /* Strip any path or options and get the file part of alt_dialer_exe */
  1361. alt_dialer_exe = translate(alt_dialer_exe)
  1362. parse var alt_dialer_exe alt_dialer_name alt_dialer_options
  1363. alt_dialer_name = filespec('name', alt_dialer_name)
  1364. parse var alt_dialer_name alt_dialer '.' ext
  1365.  
  1366. /* Get the drive and path to alt_dialer_exe */
  1367. alt_dialer_drive = filespec('drive', alt_dialer_exe)
  1368. alt_dialer_path = alt_dialer_drive || filespec('path', alt_dialer_exe)
  1369. alt_dialer_dir = strip(alt_dialer_path, 'T', '\') /* path minus final '\' */
  1370. RETURN
  1371.  
  1372. /*
  1373. ==============================================
  1374. get_userID()
  1375.  
  1376. Prompt for this and verify
  1377. ==============================================
  1378. */
  1379.  
  1380. get_userID:
  1381.  
  1382. call SysCls
  1383. say ''
  1384. say 'MAIL AND NEWS USER ID SCREEN'
  1385. say ''
  1386. say 'Enter UserID part of your e-mail address'
  1387. say 'Example: if your e-mail address is jsmith@goodnet.net'
  1388. say 'then your UserID is jsmith'
  1389. say ''
  1390. info_entered = ''
  1391. match_info_entered = ''
  1392. prompt = 'Enter userID:'
  1393. call prompt_for_info
  1394. POP_ID = info_entered
  1395. say 'userID is' POP_ID
  1396. say ''
  1397. say 'Press any key to continue'
  1398. call SysGetKey 'NOECHO'
  1399. RETURN
  1400.  
  1401. /*
  1402. ==============================================
  1403. get_domain()
  1404.  
  1405. Prompt for this and verify
  1406. ==============================================
  1407. */
  1408.  
  1409. get_domain:
  1410.  
  1411. call SysCls
  1412. say ''
  1413. say 'MAIL AND NEWS DOMAIN SCREEN'
  1414. say ''
  1415. say 'Enter Domain part of your e-mail address'
  1416. say 'Example: if your e-mail address is jsmith@goodnet.net'
  1417. say 'then your Domain is goodnet.net'
  1418. say ''
  1419. info_entered = ''
  1420. match_info_entered = ''
  1421. prompt = 'Enter domain name:'
  1422. call prompt_for_info
  1423. domain_name = info_entered
  1424. say 'domain name is' domain_name
  1425. say ''
  1426. say 'Press any key to continue'
  1427. call SysGetKey 'NOECHO'
  1428. RETURN
  1429.  
  1430.  
  1431. /*
  1432. ==============================================
  1433. get_nameservers()
  1434.  
  1435. Prompt for primary and alternate and verify
  1436. ==============================================
  1437. */
  1438.  
  1439. get_nameservers:
  1440.  
  1441. /* get primary nameserver address */
  1442.  
  1443. call SysCls
  1444. say ''
  1445. say 'NAMESERVER SCREENS (primary and alternate)'
  1446. say ''
  1447. say 'Enter primary nameserver address in Decimal Dot'
  1448. say 'notation.    Example: 150.203.23.247'
  1449. say ''
  1450. info_entered = ''
  1451. match_info_entered = ''
  1452. prompt = 'Enter primary nameserver address:'
  1453. call prompt_for_info
  1454. DNS = info_entered
  1455. say 'Primary nameserver is' DNS
  1456. say ''
  1457. say 'Press any key to continue'
  1458. call SysGetKey 'NOECHO'
  1459.  
  1460. /* Now get alternate nameserver address */
  1461.  
  1462. say ''
  1463. say ''
  1464. say ''
  1465. say 'Now enter alternate nameserver address in Decimal Dot'
  1466. say 'notation.    Example: 150.203.23.247'
  1467. say 'If you do not have an alternate, press ENTER twice'
  1468. say 'to bypass this screen, or enter primary again.'
  1469. say ''
  1470. info_entered = ''
  1471. match_info_entered = ''
  1472. prompt = 'Enter alternate nameserver address:'
  1473. DNS2 = info_entered
  1474. say 'Alternate nameserver is' DNS2
  1475. say ''
  1476. say 'Press any key to continue'
  1477. call SysGetKey 'NOECHO'
  1478.  
  1479. /* If no alternate nameserver was entered, set DNS2 = DNS */
  1480. DNS = strip(DNS, 'B')
  1481. DNS = strip(DNS, 'B', tab)
  1482. DNS2 = strip(DNS2, 'B')
  1483. DNS2 = strip(DNS2, 'B', tab)
  1484. if DNS2 = '' then DNS2 = DNS
  1485. RETURN
  1486.  
  1487.  
  1488. /*
  1489. ==============================================
  1490. get_pop3mail_server()
  1491.  
  1492. Prompt for this and verify
  1493. ==============================================
  1494. */
  1495.  
  1496. get_pop3mail_server:
  1497.  
  1498. call SysCls
  1499. say ''
  1500. say 'POP3 SERVER (Mail Server) SCREEN'
  1501. say ''
  1502. say 'Example: pop01.us.ny.ibm.net'
  1503. say ''
  1504. info_entered = ''
  1505. match_info_entered = ''
  1506. prompt = 'Enter POP3 server:'
  1507. call prompt_for_info
  1508. popsrvr = info_entered
  1509. say 'POP3 Server is' popsrvr
  1510. say ''
  1511. say 'Press any key to continue'
  1512. call SysGetKey 'NOECHO'
  1513. RETURN
  1514.  
  1515.  
  1516. /*
  1517. ==============================================
  1518. call get_smtp_server()
  1519.  
  1520. Prompt for this and verify
  1521. ==============================================
  1522. */
  1523.  
  1524. get_smtp_server:
  1525.  
  1526. call SysCls
  1527. say ''
  1528. say 'SMTP MAIL GATEWAY (Mail Server) SCREEN'
  1529. say ''
  1530. say 'Example: smtp.gw-01.ny.us.ibm.net'
  1531. say ''
  1532. info_entered = ''
  1533. match_info_entered = ''
  1534. prompt = 'Enter SMTP server:'
  1535. call prompt_for_info
  1536. mail_gw = info_entered
  1537. say 'SMTP Server is' mail_gw
  1538. say ''
  1539. say 'Press any key to continue'
  1540. call SysGetKey 'NOECHO'
  1541. RETURN
  1542.  
  1543.  
  1544. /*
  1545. ==============================================
  1546. get_news_server()
  1547.  
  1548. Prompt for this and verify
  1549. ==============================================
  1550. */
  1551.  
  1552. get_news_server:
  1553.  
  1554. call SysCls
  1555. say ''
  1556. say 'NEWS SERVER (NNTP Server) SCREEN'
  1557. say ''
  1558. say 'Example: news01.us.ny.ibm.net'
  1559. say ''
  1560. info_entered = ''
  1561. match_info_entered = ''
  1562. prompt = 'Enter NNTP server:'
  1563. call prompt_for_info
  1564. default_news = info_entered
  1565. say 'News Server is' default_news
  1566. say ''
  1567. say 'Press any key to continue'
  1568. call SysGetKey 'NOECHO'
  1569. RETURN
  1570.  
  1571. /*
  1572. ==============================================
  1573. get_login_id()
  1574.  
  1575. Prompt for this and verify
  1576. ==============================================
  1577. */
  1578.  
  1579. get_login_id:
  1580.  
  1581. call SysCls
  1582. say ''
  1583. say 'LOGIN_ID FOR LOGGING INTO PROVIDER'
  1584. say ''
  1585. say 'This is the ID you use when you login to your provider.'
  1586. say 'It may or may not be the same as your POP3 Mail user ID.'
  1587. say ''
  1588. info_entered = ''
  1589. match_info_entered = ''
  1590. prompt = 'Enter LOGIN_ID:'
  1591. call prompt_for_info
  1592. login_id = info_entered
  1593. say 'LOGIN_ID is' login_id
  1594. say ''
  1595. say 'Press any key to continue'
  1596. call SysGetKey 'NOECHO'
  1597. RETURN
  1598.  
  1599. /*
  1600. ==============================================
  1601. get_dialer_app()
  1602.  
  1603. Prompt for this and verify
  1604. ==============================================
  1605. */
  1606.  
  1607. get_dialer_app:
  1608.  
  1609. call SysCls
  1610. say ''
  1611. say 'DIALER HOST NAME'
  1612. say ''
  1613. say 'This is the name you used for the entry name when you'
  1614. say 'configured the dialer to your host provider.'
  1615. say 'It is Name in a command line of the type shown below'
  1616. say '(where slippm.exe is the dialer in this particular example)'
  1617. say '     SLIPPM.EXE Name'
  1618. say 'This should start up your dialer, connecting to the correct'
  1619. say 'host.'
  1620. say ''
  1621. say 'You can test the validity of ''Name'' by entering this'
  1622. say 'command in an OS/2 window, after changing to the directory'
  1623. say 'where your dialer .EXE resides.  It should connect you.'
  1624. say ''
  1625. say 'You may need to reproduce exactly whatever combination of'
  1626. say 'combination ofUpper/Lower case letters you used to define'
  1627. say 'the Name of the dialer entry'
  1628. say ''
  1629. info_entered = ''
  1630. match_info_entered = ''
  1631. prompt = 'Name you used as dialer entry:'
  1632. call prompt_for_info
  1633. host_app = info_entered
  1634. say 'Dialer name for entry is' host_app
  1635. say ''
  1636. say 'Press any key to continue'
  1637. call SysGetKey 'NOECHO'
  1638. RETURN
  1639.  
  1640. /*
  1641. =================
  1642. get_comport()
  1643. =================
  1644. */
  1645. get_comport:
  1646. call SysCls
  1647. say ''
  1648. say 'COM PORT'
  1649. say ''
  1650. say 'Enter COM port used by this installation'
  1651. say 'Enter as COM1, COM2, etc.'
  1652. say 'There should be NO space between COM and the port number'
  1653. say ''
  1654. info_entered = ''
  1655. match_info_entered = ''
  1656. prompt = 'Enter:'
  1657. call prompt_for_info
  1658. comport = info_entered
  1659. comport = translate(comport)
  1660. say 'COM port entered is' comport
  1661. say ''
  1662. say 'Press any key to continue'
  1663. call SysGetKey 'NOECHO'
  1664. RETURN
  1665.  
  1666. /*
  1667. ==============================================
  1668. get_shell_windowsize()
  1669.  
  1670. This is the size of the maximized window when YRNSHELL.CMD runs.
  1671.  
  1672. Prompt for this and verify
  1673. ==============================================
  1674. */
  1675.  
  1676. get_shell_windowsize:
  1677.  
  1678. call SysCls
  1679. say ''
  1680. say 'YARN SHELL WINDOW SIZE:'
  1681. say ''
  1682. say 'This installer creates a utility to run YARN, called' yarnshell_cmd
  1683. say 'You can choose to have a larger-than-normal window size when'
  1684. say yarnshell_cmd 'runs and the window is maximized.'
  1685. say 'Select:'
  1686. say '1  80 chars wide x 24 lines (this is a normal OS/2 window)'
  1687. say '2  80 chars wide x 40 lines (recommended)'
  1688. say '3  90 chars wide x 40 lines'
  1689. say ''
  1690. do until pos(size, '123') \= 0
  1691.    prompt = 'Enter 1, 2 or 3:'
  1692.    say ''
  1693.    say prompt
  1694.       parse value SysCurPos() with row col
  1695.       row  = row - 1
  1696.       col = length(prompt) + 2
  1697.       call SysCurPos row, col
  1698.    size = SysGetKey('NOECHO')
  1699.    say ''
  1700.    if size = 1 then
  1701.       do
  1702.          say 'You have selected 80 chars x 24 lines'
  1703.          conmode = 'mode co80,24'
  1704.       end
  1705.    if size = 2 then
  1706.       do
  1707.          say 'You have selected 80 chars x 40 lines'
  1708.          conmode = 'mode co90,40'
  1709.       end
  1710.    if size = 3 then
  1711.       do
  1712.          say 'You have selected 90 chars x 40 lines'
  1713.          conmode = 'mode co90,40'
  1714.       end
  1715.    if pos(size, '123') = 0 then say 'Incorrect.  Try again.'
  1716. end
  1717. say ''
  1718. say '   After installation, you can edit' yrnshell_cmd 'to set the window'
  1719. say '   maximum to other sizes.  For example, to change from'
  1720. say '   80 chars by 24 lines to 90x38, change the line:'
  1721. say '     ''mode co80,24'''
  1722. say '   in' yrnshell_cmd 'located in your' home 'directory to'
  1723. say '     ''mode co90,38'''
  1724. say '   You must include the quotes, as shown.'
  1725. say''
  1726. say 'Press any key to continue'
  1727. call SysGetKey('NOECHO')
  1728.  
  1729. RETURN
  1730. /*
  1731. ==================
  1732. get_injoy_parms()
  1733.  
  1734. Dissect the IN-JOY HOSTS.DAT file getting
  1735.    configuration name
  1736.    numerical addresses of main and alternate nameservers
  1737.    login ID
  1738.    domain name
  1739.    comport
  1740. ==================
  1741. */
  1742.  
  1743. get_injoy_parms:
  1744. /* locate the IN-JOY HOSTS.DAT file */
  1745. call SysCls
  1746. say ''
  1747. say 'Searching though IN-JOY''s' hosts_dat 'file for'
  1748. say 'dialing configurations...'
  1749. say '' 
  1750. if stream(alt_dialer_path || hosts_dat, 'c', 'query exists') \= '' then
  1751.    hosts_dat = stream(alt_dialer_path || hosts_dat, 'c', 'query exists')
  1752. else
  1753.    do 
  1754.       say ''
  1755.       say 'ERROR: Cannot find IN-JOY''s HOSTS.DAT file in the directory'   
  1756.       say alt_dialer_dir 'where' injoy_exe 'was found.'
  1757.       say ''
  1758.       say 'Check that all IN-JOY files are together in one single directory'
  1759.       say 'and that you configured IN-JOY to connect to your Internet'
  1760.       say 'Service Provider.'
  1761.       say ''
  1762.       say 'This is not fatal (YD_PARMS.DAT can be edited).'
  1763.       other_err = 1
  1764.       ijparms_err1 = 1
  1765.       if ijparms_err1 = 1 then
  1766.          ijparms_errmsg1 = 'No IN-JOY HOSTS.DAT file found.'
  1767.       say 'Press any key to continue or Escape to exit'
  1768.       if SysGetKey('NOECHO') = Escape then signal goodbye
  1769.       signal exit_get_ijparms
  1770.    end
  1771. filesize1 = chars(hosts_dat)
  1772. if stream(alt_dialer_patrh || 'default.cfg', 'c', 'query exists') \= '' then
  1773.    filesize2 = chars(alt_dialer_path || 'default.cfg') - 10
  1774.    else filesize2 = 1167    /* a guess */ 
  1775. hosts = trunc((filesize1 / filesize2), 0)
  1776. dataunit = trunc((filesize1) / hosts)
  1777. i = 1
  1778. do  hosts
  1779. /* offsets from start of HOSTS.DAT */
  1780.    offset = dataunit * (i - 1)
  1781.    cfgname_lenbyte = offset + 1
  1782.    cfgname_pos = offset + 3
  1783.    interfname_pos = offset + 71
  1784.    ns1_pos = offset + 126
  1785.    ns2_pos = offset + 142
  1786.    loginid_lenbyte = offset + 282
  1787.    loginid_pos = offset + 286
  1788.    domain_pos = offset + 419
  1789.    comport_pos = offset + 504
  1790.  
  1791. /* get the parameters */
  1792.    cfgname.i = get_hostsdat_Lparm(cfgname_lenbyte, cfgname_pos)
  1793.    interfname.i = get_hostsdat_0parm(interfname_pos)
  1794.    ns1.i = get_hostsdat_0parm(ns1_pos)
  1795.    ns2.i = get_hostsdat_0parm(ns2_pos)
  1796.    loginid.i = get_hostsdat_Lparm(loginid_lenbyte, loginid_pos)
  1797.    domain.i = get_hostsdat_0parm(domain_pos)
  1798.    comport.i = get_hostsdat_0parm(comport_pos)
  1799.  
  1800.    i = i + 1
  1801. end
  1802.  
  1803. if i = 1 then
  1804.    do
  1805.       say 'ERROR:  found no IN-JOY dialing configurations'
  1806.       say 'Check if you set up one in IN-JOY and that all'
  1807.       say 'IN-JOY files are together in one single directory.'
  1808.       say ''
  1809.       say 'Another possibility is that IN-JOY HOSTS.DAT file'
  1810.       say 'format is different from the one in IN-JOY v 09'
  1811.       say 'used as model for retrieving IN-JOY parameters.'
  1812.       say 'Please e-mail jlevy@ibm.net (author of YARNDIAL)'
  1813.       say 'if assistance is needed.'
  1814.       say 'This is not fatal (YD_PARMS.DAT can be edited).'
  1815.       other_err = 1
  1816.       ijparms_err2 = 1
  1817.       if ijparms_err2 = 1 then
  1818.          ijparms_errmsg2 = 'No Dialer configurations found in IN-JOY''s HOSTS.DAT'
  1819.       say 'Press any key to continue or Escape to abort'
  1820.       if SysGetKey('NOECHO') = Escape then signal goodbye
  1821.       signal exit_get_ijparms
  1822.    end
  1823.  
  1824. if i = 2 then
  1825.    do
  1826.       say 'Found and selected the following dialing configuration:'
  1827.       say '   ' cfgname.1
  1828.    end
  1829.  
  1830. if i > 2 then
  1831.    do
  1832.       say 'Found the following dialing configurations:'
  1833.       do j = 1 to i -1
  1834.          say j cfgname.j
  1835.          if j \= 0 & j // 15 = 0 then
  1836.             do
  1837.                say '   There are more, press any key to continue'
  1838.                say '   If one of these is the right one, remember the number!!!'
  1839.                call SysGetKey 'NOECHO'
  1840.             end
  1841.       end
  1842.       say ''
  1843.       say '     Select the item above by number which is what you entered'
  1844.       say '     as the configuration name (i.e, HOST ID) when setting up'
  1845.       say '     IN-JOY to connect to your Internet Service Provider'
  1846.       say ''
  1847.       do until DataType(ij_app, 'W') & ij_app > 0 & ij_app < j
  1848.          prompt = 'Selection:' 
  1849.          say prompt
  1850.          parse value SysCurPos() with row col
  1851.          row  = row - 1
  1852.          col = length(prompt) +2
  1853.          call SysCurPos row, col
  1854.          parse pull ij_app
  1855.          if \DataType(ij_app, 'W') | ij_app <1 | ij_app > j-1 then
  1856.             say 'Must be 1-' || j-1
  1857.       end
  1858.       say ''
  1859.       say 'Selected' cfgname.ij_app 'as the IN-JOY Dialer host ID.'
  1860.    end /* DO if i > 2 */
  1861.  
  1862. say ''
  1863. say ''
  1864. say 'Press any key to continue'
  1865. call SysGetKey 'NOECHO'
  1866.  
  1867. host_app = cfgname.ij_app
  1868. interf_prefix = interfname.ij_app
  1869. DNS = ns1.ij_app
  1870. DNS2 = ns1.ij_app
  1871. login_id =loginid.ij_app
  1872. DOMAIN_NAME = domain.ij_app
  1873. COMPORT = comport.ij_app
  1874.  
  1875. exit_get_ijparms:
  1876. RETURN cfgname.ij_app
  1877.  
  1878. /*
  1879. ================
  1880. get_hostsdat_Lparm()
  1881. get_hostsdat_0parm()
  1882.  
  1883. Both called by get_injoy_parms()
  1884. These extract parameters from the IN-JOY hosts.dat
  1885. file.
  1886.  
  1887. get_hostsdat_Lparm() is used where
  1888. there is a length byte available.  Input arguments are
  1889. offsets from beginning of file as follows:
  1890.     lenpos        location of length byte
  1891.         parmpos    location of parameter     
  1892.  
  1893. get_hostsdat_0parm() is used where
  1894. there is no length byte available and where the parameter
  1895. is null-delimited.  Sole input argument is offset from beginning
  1896. of file for:
  1897.         parmpos    location of parameter 
  1898. =================
  1899. */
  1900.  
  1901.  
  1902. get_hostsdat_Lparm:
  1903. arg lenpos, parmpos
  1904. call stream hosts_dat, 'c', 'seek =' lenpos    /* position to length byte */
  1905. parm_length = c2d(charin(hosts_dat))        /* get length */
  1906. call stream hosts_dat, 'c', 'seek =' parmpos    /* position to parm */
  1907. parameter = ''
  1908. do parm_length                    /* build the parm */
  1909.    char = charin(hosts_dat)
  1910.    parameter = parameter || char
  1911. end
  1912. RETURN parameter
  1913.  
  1914. get_hostsdat_0parm:
  1915. arg parmpos
  1916. call stream hosts_dat, 'c', 'seek =' parmpos
  1917. parameter = ''
  1918. do until c2d(char) = 0
  1919.    char = charin(hosts_dat)
  1920.    if c2d(char) \= 0 then parameter = parameter || char
  1921. end
  1922. RETURN parameter
  1923.  
  1924.  
  1925. /*
  1926. ==============================================
  1927. get_interface_prefix()
  1928.  
  1929. Prompt for this and verify
  1930. ==============================================
  1931. */
  1932.  
  1933. get_interface_prefix:
  1934.  
  1935. call SysCls
  1936. say ''
  1937. say 'INTERFACE PREFIX SCREEN'
  1938. say ''
  1939. do until pos(dialer_selection, '1239') \= 0
  1940.    say 'Select (normally select 1 for an IN-JOY ppp connection'
  1941.    say '  or 3 for an IN-JOY slip connection):'
  1942.    say '1  PPP or ppp'
  1943.    say '2  SL or sl'
  1944.    say '3  SLIP or slip'
  1945.    say '4-8 (Reserved for future use)'
  1946.    say '9  Not listed so prompt me'
  1947.  
  1948.    say ''
  1949.    prompt = 'Enter 1-3 or 9:'
  1950.    say ''
  1951.    say prompt
  1952.       parse value SysCurPos() with row col
  1953.       row  = row - 1
  1954.       col = length(prompt) + 2
  1955.       call SysCurPos row, col
  1956.    interf_prefix = SysGetKey('ECHO')
  1957.    say ''
  1958.  
  1959.    select
  1960.       when interf_prefix = 1 then
  1961.          do
  1962.             say 'Selected:  PPP or ppp'
  1963.             interf_prefix = 'PPP'
  1964.          end
  1965.       when interf_prefix = 2 then
  1966.          do
  1967.             say 'Selected:  SL (regardless of case)'
  1968.             interf_prefix = 'SL'
  1969.          end
  1970.       when interf_prefix = 3 then
  1971.          do
  1972.             say 'Selected:  SLIP or slip'
  1973.             interf_prefix = 'SLIP'
  1974.          end
  1975.       when interf_prefix = 9 then
  1976.          do
  1977.             say 'You chose to enter the prefix'
  1978.          end
  1979.       when pos(interf_prefix, '1239') = 0 then
  1980.          say 'Must enter 1-3 or 9.  Try again'
  1981.    end     /* of Select */
  1982.    say ''
  1983. end    /* of Do Until */
  1984. say ''
  1985. say 'Press any key to continue'
  1986. call SysGetKey 'NOECHO'
  1987.  
  1988. if interf_prefix = 9 then
  1989.    do
  1990.       parse value SysCurPos() with row col
  1991.       row  = row - 1
  1992.       col = 0
  1993.       call SysCurPos row, col
  1994.  
  1995.       say 'Enter a prefix.  Maximum 5 characters.'
  1996.       say 'Letters preferred, though anything will work.  Read YD.DOC for info.'
  1997.       say 'Examples: ppp, sl, lan'
  1998.       say ''
  1999.       info_entered = ''
  2000.       match_info_entered = ''
  2001.       prompt = 'Prefix:'
  2002.       call prompt_for_info
  2003.       interf_prefix = info_entered
  2004.       interf_prefix = left(interf_prefix, 5)
  2005.       say 'Prefix is' interf_prefix
  2006.       say ''
  2007.       say 'Press any key to continue'
  2008.       call SysGetKey 'NOECHO'
  2009.    end
  2010. RETURN
  2011.  
  2012. /*
  2013. ==============
  2014. prompt_for_info()
  2015.  
  2016. Makes you enter it twice to verify
  2017. ==============
  2018. */
  2019. prompt_for_info:
  2020. do until match_info_entered = info_entered
  2021.    say prompt
  2022.       parse value SysCurPos() with row col
  2023.       row  = row - 1
  2024.       col = length(prompt) + 2
  2025.       call SysCurPos row, col
  2026.       parse pull info_entered
  2027.    if info_entered = '' then info_entered = '(nothing entered)'
  2028.    say ''
  2029.    prompt = 'Enter it again to verify:'
  2030.    say prompt
  2031.       parse value SysCurPos() with row col
  2032.       row  = row - 1
  2033.       col = length(prompt) + 2
  2034.       call SysCurPos row, col
  2035.       parse pull match_info_entered
  2036.    if match_info_entered = '' then match_info_entered = '(nothing entered)'
  2037.    if match_info_entered \== info_entered then
  2038.       do
  2039.          say ''
  2040.          say match_info_entered 'does not match' info_entered
  2041.          say 'Try again'
  2042.       end
  2043. end
  2044. RETURN info_entered
  2045.  
  2046.  
  2047. /*
  2048. =========================
  2049. are_we_SLIP_or_PPP()
  2050.  
  2051. Which are we?
  2052. =========================
  2053. */
  2054. are_we_SLIP_or_PPP:
  2055. do until pos(serv, 'SP') \= 0
  2056.    call SysCls
  2057.    say ''
  2058.    say 'SLIP OR PPP?'
  2059.    say ''
  2060.    say 'Will this be a SLIP or PPP connection?'
  2061.    prompt = 'Enter S or P:'
  2062.    say ''
  2063.    say prompt
  2064.       parse value SysCurPos() with row col
  2065.       row  = row - 1
  2066.       col = length(prompt) + 2
  2067.       call SysCurPos row, col
  2068.    serv = translate(SysGetKey('ECHO'))
  2069.    say ''
  2070.    if serv = 'S' then
  2071.       do
  2072.          say 'Selected:  SLIP'
  2073.          service = 'SLIP'
  2074.       end
  2075.    if serv = 'P' then
  2076.       do
  2077.          say 'Selected: PPP'
  2078.          service = 'PPP'
  2079.       end
  2080.    if pos(serv, 'SP') = 0 then say 'Must enter either S or P.  Try again'
  2081.    say ''
  2082. end
  2083. say ''
  2084. say 'Press any key to continue'
  2085. call SysGetKey 'NOECHO'
  2086. RETURN
  2087.  
  2088. /*
  2089. =========================
  2090. should_we_piggyback_on_slippm()
  2091.  
  2092. We can draw parms from tcpos2.ini, as stored there
  2093. by slippm, or we can be prompted to enter (some) of them.
  2094. =========================
  2095. */
  2096. should_we_piggyback_on_slippm:
  2097. piggyback = 1 /* initialize */
  2098. call SysCls
  2099. say ''
  2100. say 'PARAMETERS FOR DIALER'
  2101. say ''
  2102. say 'You can either get parameters your dialer needs from'
  2103. say 'a previous SLIPPM (Dial-Other-Internet-Providers)'
  2104. say 'installation, or you can be prompted for them.  It is'
  2105. say 'much easier to get parameters from a previous SLIPPM'
  2106. say 'setup.'
  2107. say ''
  2108. say 'Select:'
  2109. say '1  Get parameters from a previous SLIPPM installation'
  2110. say '2  Enter parameters from keyboard (prompted)'
  2111. say ''
  2112. say 'To quit so you can configure SLIPPM.EXE, press Escape.' 
  2113.  
  2114. prompt = 'Enter 1 or 2:'
  2115. say ''
  2116. do until pos(piggy, '12') \= 0
  2117.    say prompt
  2118.       parse value SysCurPos() with row col
  2119.       row  = row - 1
  2120.       col = length(prompt) + 2
  2121.       call SysCurPos row, col
  2122.    piggy = SysGetKey('ECHO')
  2123.    say ''
  2124.    if piggy = Escape then signal goodbye
  2125.  
  2126.    if piggy = 1 then
  2127.       do
  2128.          say 'We will piggyback parms from a previous SLIPPM installation'
  2129.          piggyback = 1
  2130.       end
  2131.  
  2132.    if piggy = 2 then
  2133.       do
  2134.          say 'Chose to be prompted for key parameters                        '
  2135.          piggyback = 0
  2136.       end
  2137.    if pos(piggy, '12') = 0 then
  2138.       say 'Must enter either 1 or 2.  Try again'
  2139.    say ''
  2140. end
  2141. say ''
  2142. say 'Press any key to continue'
  2143. call SysGetKey 'NOECHO'
  2144. RETURN
  2145.  
  2146.  
  2147. /*
  2148. =========================
  2149. enable_dnk_option()
  2150.  
  2151. Should we enable the do_not_kil option?
  2152.  
  2153. This will allow the connection to be optionally shut down
  2154. or not depending on which keys are pressed at the main menu.
  2155. =========================
  2156. */
  2157. enable_dnk_option:
  2158. do_not_kill_connection = 0    /* initialize to don't enable (=1 is enable) */
  2159. call SysCls
  2160. say ''
  2161. say 'DO NOT-KILL-CONNECTION OPTION'
  2162. say ''
  2163. say 'You can have the connection shut down at the end or not'
  2164. say 'depending on which keys are pressed at the main menu.'
  2165. say 'Or you can have YARNDIAL ALWAYS shut it down at the end.'
  2166. say ''
  2167. say 'Select:'
  2168. say '0  Always shut down connection, etc., when YARNDIAL transfers are done'
  2169. say '1  Give us the option to shut down or not.'
  2170.  
  2171. prompt = 'Enter 0 (zero) or 1:'
  2172. say ''
  2173. do until do_not_kill_connection = 0 | do_not_kill_connection = 1
  2174.    say prompt
  2175.       parse value SysCurPos() with row col
  2176.       row  = row - 1
  2177.       col = length(prompt) + 2
  2178.       call SysCurPos row, col
  2179.    do_not_kill_connection = SysGetKey('ECHO')
  2180.    say ''
  2181.    if do_not_kill_connection = 1 then
  2182.       do
  2183.          say 'Can optionally choose at main menu to leave connection up  '
  2184.          say 'when transfers are done.'
  2185.       end
  2186.    if do_not_kill_connection = 0 then
  2187.       do
  2188.          say 'Connection will always shut down when transfers are done.  '
  2189.       end
  2190.  
  2191.    if do_not_kill_connection \= 0 & do_not_kill_connection \= 1 then
  2192.       say 'Must enter either 0 or 1.  Try again'
  2193.    say ''
  2194. end
  2195. say ''
  2196. say 'Press any key to continue'
  2197. call SysGetKey 'NOECHO'
  2198. RETURN
  2199.  
  2200.  
  2201.  
  2202. /*
  2203. ==============================================
  2204. get_passw_PWD()
  2205.  
  2206. Prompt for the Provider Access password.
  2207. ==============================================
  2208. */
  2209.  
  2210. get_passw_PWD:
  2211.  
  2212. call SysCls
  2213. say ''
  2214. say 'PROVIDER ACCESS PASSWORD'
  2215. say ''
  2216. say 'If you press enter instead of entering a password, '
  2217. say 'password is not stored and you will be prompted for one.'
  2218. say 'This is the password for accessing the provider.  For'
  2219. say 'some providers it and the e-mail POP3 password are the'
  2220. say 'same and YARNDIAL uses the POP3 password you were'
  2221. say 'prompted for and responded to earlier.'
  2222. say ''
  2223. say 'In most setups, you will bypass this by pressing ENTER'
  2224. say 'two times, thus not recording any password.'
  2225. say ''
  2226. say ''
  2227. do until match = some_password
  2228.    call pull_password
  2229. end
  2230. PWD = some_password
  2231. RETURN
  2232.  
  2233. /*
  2234. ==============================================
  2235. get_passw_POP3PWD()
  2236.  
  2237. Prompt for the pop password (e-mail).
  2238. ==============================================
  2239. */
  2240.  
  2241. get_passw_POP3PWD:
  2242.  
  2243. call SysCls
  2244. say ''
  2245. say 'POP (e-mail) PASSWORD SCREEN'
  2246. say ''
  2247. say 'Enter password used for e-mail.'
  2248. say 'This is your POP (or POP3) password.'
  2249. say ''
  2250. say ''
  2251. do until match = some_password
  2252.    call pull_password
  2253. end
  2254. POP_PWD = some_password
  2255. RETURN
  2256.  
  2257.  
  2258. /*
  2259. ==============================================
  2260. pull_password()
  2261. and
  2262. get_pw()
  2263.  
  2264. The actual keyboard-entry routine get_pw()
  2265. is a modification of one from the IBM Rexx Manual
  2266. which is copyrighted by IBM and is used here with
  2267. permission.
  2268.  
  2269. pull_password() simply calls the routine get_pw()
  2270. twice:  once to get the password, and again to confirm.
  2271. We do this until an entered password can be confirmed.
  2272.  
  2273. get_pw() accepts the argument H, h, Hide, hide which
  2274. will echo * instead of the character.
  2275. ==============================================
  2276. */
  2277.  
  2278.  
  2279. pull_password:
  2280.  
  2281.    prompt = 'Enter password:'
  2282.    say prompt
  2283.       parse value SysCurPos() with row col
  2284.       row  = row - 1
  2285.       col = length(prompt) + 2
  2286.       call SysCurPos row, col
  2287.       call get_pw 'H'
  2288.    some_password = password
  2289.    say ''
  2290.    prompt = 'Enter it again to verify:'
  2291.    say prompt
  2292.       parse value SysCurPos() with row col
  2293.       row  = row - 1
  2294.       col = length(prompt) + 2
  2295.       call SysCurPos row, col
  2296.       call get_pw 'H'
  2297.       match = password
  2298.    if match \== some_password then say 'The two did not match'
  2299.    say ''
  2300. RETURN
  2301.  
  2302.  
  2303.  
  2304. get_pw: procedure expose password 
  2305.  
  2306. /* H or h or hide as argument echos chars as *
  2307. otherwise chars entered are echoed     */
  2308.  
  2309. parse upper arg hide_for_passwording
  2310. hide_for_passwording = abbrev(hide_for_passwording, 'H')
  2311.  
  2312. bs = d2c(8)
  2313. cr = d2c(13)            /* enter key, as well as carriage return */
  2314. escape = d2c(27)        /* escape character */
  2315. X1 = d2c(0)            /* Extended key */
  2316. X2 = d2c(224)            /* Extended key */
  2317.  
  2318. Valid = xrange(' ', '~') 
  2319. /* same as Valid = ' !"#$%&''()*+,-./0123456789:;',
  2320.          '<=>?@''ABCDEFGHIJKLMNOPQRSTUVWXYZ',
  2321.          '[\]^_abcdefghijklmnopqrstuvwxyz{|}~'
  2322. very nearly every common printable */ 
  2323. password = ''
  2324. MaxLength = 254
  2325.  
  2326. do forever
  2327.    ch = SysGetKey('NOECHO')
  2328.    select
  2329.       when ch = Escape then signal goodbye  /* Escape, so we quit immediately */
  2330.       when ch = cr    /* Enter key pressed */
  2331.          then do
  2332.             say ''    /* Give carriage return */
  2333.             leave
  2334.          end
  2335.       when ch = bs    /* Backspace */
  2336.          then if password = ''
  2337.             then call  beep 262, 200    /* Tell us no chars to bs over */
  2338.          else do    /* Overstrike a blank */
  2339.             call charout , bs bs 
  2340.             password = left(password, length(password)-1)
  2341.          end
  2342.  
  2343.                         /* All other characters */
  2344.       when pos(ch, Valid) > 0
  2345.          then if length(password) = MaxLength
  2346.             then call beep 262, 200
  2347.             else do
  2348.                if hide_for_passwording = 1 then call charout , '*'
  2349.                else call charout , ch
  2350.                password = password || ch
  2351.             end
  2352.       otherwise do     /* Swallow next for Extended */
  2353.          if ch = X1 | ch = X2
  2354.             then call SysGetKey 'NOECHO'
  2355.          call  beep 262, 200
  2356.       end
  2357.    end
  2358. end
  2359. RETURN password 
  2360.  
  2361. /*
  2362. ==============================================
  2363. get_dialer_timeout_wait()
  2364.  
  2365. When we dial in, how long before we let our dialer time out?
  2366. ==============================================
  2367. */
  2368. get_dialer_timeout_wait:
  2369. call SysCls
  2370. say ''
  2371. say 'SET DIALER TIMEOUT'
  2372. say ''
  2373. say 'Wait how many seconds before Advantis dialer times out.'
  2374. say 'Default: 120 seconds'
  2375. say '(usually allows both main and backup number to be attempted)'
  2376. say ''
  2377. prompt = 'Press Enter to accept default, or enter wait in seconds:' 
  2378. do until DataType(wait,'W')
  2379.    say prompt
  2380.       parse value SysCurPos() with row col
  2381.       row  = row - 1
  2382.       col = length(prompt) + 2
  2383.       call SysCurPos row, col
  2384.       pull wait .
  2385.       if wait = '' then
  2386.          do
  2387.             wait = 120
  2388.          end
  2389.       if DataType(wait) = 0 then say 'Whole number only. Try Again.'
  2390.       else say 'wait =' wait 'seconds'
  2391. end
  2392. say ''
  2393. say 'Press any key to continue'
  2394. call SysGetKey 'NOECHO'
  2395. RETURN
  2396.  
  2397. /*
  2398. ==============================================
  2399. souper_options()
  2400.  
  2401. We set some new default options for souper
  2402. ==============================================
  2403. */
  2404.  
  2405. souper_options:
  2406. call SysCls
  2407. getnews_xtra_options = '' /* the defaults */
  2408. getmail_xtra_options = ''
  2409. option1 = ''
  2410. option2 = ''
  2411. option3 = ''
  2412.  
  2413. say ''
  2414. say 'SOUPER OPTIONS SCREEN'
  2415. say 'You can select some alternate default options when souper runs.'
  2416. say 'These can be over-ridden when you run YarnDial.  If you wish to,'
  2417. say 'you can set these and more by editing' ydparms_dat
  2418. say 'after this install has completed, instead of using this screen.'
  2419. do until opts = 5
  2420.    say ''
  2421.    say 'Press:'
  2422.    say '  1 Set maximum news packetsize (default is 2048KB [2.048MB])'
  2423.    say '  2 Do not retrieve newsgroup articles containing more than a'
  2424.    say '    set number of lines in the body (default is: no limit)'
  2425.    say '  3 Check for new newsgroups (default is ''don''t check'')'
  2426.    say '  4 Default all three of the above.'
  2427.    say '  5 When done, must press 5 to exit this screen'
  2428.    do until pos(opts,'12345') \= 0
  2429.       say ''
  2430.       prompt = 'Select 1, 2, 3, 4, or 5:'
  2431.       say prompt
  2432.          parse value SysCurPos() with row col
  2433.          row  = row - 1
  2434.          col = length(prompt) + 2
  2435.          call SysCurPos row, col
  2436.       opts = SysGetKey('NOECHO')
  2437.    end
  2438.    
  2439.    select
  2440.       when opts = 1 then call max_news_packet
  2441.       when opts = 2 then call max_news_lines
  2442.       when opts = 3 then call check_for_new_newsgrps
  2443.       when opts = 4 then
  2444.          do
  2445.             option1 = ''
  2446.             option2 = ''
  2447.             option3 = ''
  2448.             say ''
  2449.             say 'Accepting defaults for all three options'
  2450.             say ''
  2451.             say ''
  2452.             say 'Press any key to continue'
  2453.             call SysGetKey 'NOECHO'
  2454.          end
  2455.       otherwise NOP
  2456.    end
  2457.  
  2458.    getnews_xtra_options = option1 option2
  2459.    getnews_xtra_options = strip(getnews_xtra_options, 'B')
  2460.    getnews_xtra_options = getnews_xtra_options option3
  2461.    getnews_xtra_options = strip(getnews_xtra_options, 'B')
  2462.  
  2463.    getmail_xtra_options = ''            /* We don't set any of these */
  2464. end
  2465. say ''
  2466. say ''
  2467. say ''
  2468. say 'Done setting options for souper.  Looks like:'
  2469. say 'GETMAIL:  souper.exe' souper_getmail_std_options getmail_xtra_options
  2470. say 'GETNEWS:  souper.exe' souper_getnews_std_options getnews_xtra_options
  2471. say 'SENDING:  souper.exe' souper_send_std_options send_xtra_options
  2472. say ''
  2473. say ''
  2474. say 'Press any key to continue'
  2475. call SysGetKey 'NOECHO'
  2476. RETURN
  2477.  
  2478. /*
  2479. =========================
  2480. max_news_packet()
  2481.  
  2482. Default is a packet-size of 2048 kB (2.048 Megs)
  2483. =========================
  2484. */
  2485. max_news_packet:
  2486.      do until datatype(option1, 'W')
  2487.          call SysCls
  2488.          say ''
  2489.          say 'Enter a number in kilobytes for maximum news packet size.'
  2490.          say '2048 is typical. 0 sets packet size to unlimited.'
  2491.          say ''
  2492.          prompt = 'Enter number of kilobytes now:'
  2493.          say prompt
  2494.          parse value SysCurPos() with row col
  2495.          row  = row - 1
  2496.          col = length(prompt) + 2
  2497.          call SysCurPos row, col
  2498.          pull option1
  2499.          if \DataType(option1, 'W') then say 'Must be whole number or zero.'
  2500.      end
  2501.      say ''
  2502.      say 'Maximum packet size for news is set to' option1 'kilobytes'
  2503.      option1 = '-k' option1
  2504.      say ''
  2505.      say ''
  2506.      say 'Press any key to continue'
  2507.      call SysGetKey 'NOECHO'
  2508. RETURN
  2509.  
  2510. /*
  2511. =========================
  2512. max_news_lines()
  2513.  
  2514. Default is no limit.  Because of spamming of
  2515. news articles with attached binaries running
  2516. to 10,000 lines or more, you can set a limit.
  2517. I use 500, myself.
  2518. =========================
  2519. */
  2520. max_news_lines:
  2521.       call SysCls
  2522.       do until datatype(option2, 'W')
  2523.          say ''
  2524.          say 'Do not retrieve articles with more than this many lines'
  2525.          say 'in the body of the article.  Enter 0 for unlimited (the'
  2526.          say 'usual default for souper).'
  2527.          say ''
  2528.          prompt = 'How many lines is the maximum acceptable?'
  2529.          say prompt
  2530.          parse value SysCurPos() with row col
  2531.          row  = row - 1
  2532.          col = length(prompt) + 2
  2533.          call SysCurPos row, col
  2534.          pull option2
  2535.          if \DataType(option2, 'W') then say 'Must be whole number or zero.'
  2536.      end
  2537.      say ''
  2538.      say 'News article not retrieved if over' option2 'lines'
  2539.      if option2 = 0 then option2 = ''
  2540.         else option2 = '-l' option2
  2541.      say ''
  2542.      say ''
  2543.      say 'Press any key to continue'
  2544.      call SysGetKey 'NOECHO'
  2545. RETURN
  2546.  
  2547. /*
  2548. =========================
  2549. check_for_new_newsgrps()
  2550.  
  2551. 'Y' adds new ones to your newsrc file but inactivated
  2552. until you remove the 'inactivate' character.  Default
  2553. is 'N'
  2554. =========================
  2555. */
  2556. check_for_new_newsgrps:
  2557.       do until pos(option3, 'YN') \= 0
  2558.       call SysCls
  2559.          say ''
  2560.          say 'Do you want to check for new news groups and have them added'
  2561.          say 'to your newsrc file (but set as inactive until you activate them)?'
  2562.          prompt = 'Enter Y or N:'
  2563.          say ''
  2564.          say prompt
  2565.          parse value SysCurPos() with row col
  2566.          row  = row - 1
  2567.          col = length(prompt) + 2
  2568.          call SysCurPos row, col
  2569.          parse upper pull option3
  2570.       end
  2571.    say ''
  2572.    if option3 = 'Y' then
  2573.       do
  2574.          option3 = '-a'
  2575.          say 'You elected to add new news groups to your newsrc'
  2576.       end
  2577.    else
  2578.       do
  2579.          option3 = ''
  2580.          say 'You elected not to add new news groups to your newsrc'
  2581.       end
  2582.    say ''
  2583.    say ''
  2584.    say 'Press any key to continue'
  2585.    call SysGetKey 'NOECHO'
  2586. RETURN
  2587.  
  2588. /*
  2589. ==============================================
  2590. Almost done.  No changes to system yet.  Do
  2591. we want to quit before copying files?
  2592. ==============================================
  2593. */
  2594.  
  2595. chance_to_quit:
  2596. call SysCls
  2597. say ''
  2598. say 'WE ARE NOW READY TO COPY FILES...'
  2599. say ''
  2600. say 'Up till now, no changes have been made to your system.'
  2601. say ''
  2602. say 'We will complete installation by creating' ydparms_dat ||','
  2603. say 'by copying other necessary files to your' home 'directory,'
  2604. say 'and by creating some ReXX utility files which we save to'
  2605. say 'the' home 'directory.'
  2606. say ''
  2607. say 'We will create'
  2608. say '   A sub-directory named INCOMING in the' home
  2609. say '   directory (if one already exists, it is left unchanged).'
  2610. say ''
  2611. say '   A Folder Object on the Desktop containing objects for YARNDIAL'
  2612. say '   and for several utilities including one for starting up YARN.'
  2613. say ''
  2614. say 'No other changes are made to your system.'
  2615. say ''
  2616. say 'To quit without completing installation, press Escape.'
  2617. say ''
  2618. say 'Otherwise PRESS ANY OTHER KEY TO COMPLETE INSTALLATION.'
  2619. if SysGetKey('NOECHO') = Escape then
  2620.    do
  2621.       call SysCls
  2622.       say ''
  2623.       say 'Aborting without copying files to' HOME
  2624.       say 'or creating' ydparms_dat 'or creating the'
  2625.       say 'sub-directory INCOMING.'
  2626.       say ''
  2627.       say 'No changes were made to your system.'
  2628.       signal goodbye
  2629.    end
  2630. RETURN
  2631.  
  2632. /*
  2633. ==============================================
  2634. Write the YD_PARMS.DAT file to the yarn home
  2635. directory to which we are installing YarnDial.
  2636. This has all the data Yarndial needs to be
  2637. able to run from (for) that Yarn user
  2638. installation.
  2639. ==============================================
  2640. */
  2641. output_dat:
  2642. home_drive
  2643. 'cd' home
  2644.  
  2645. o21 = '&\<=>|()! *+"''-/,#$%.0123456789:;?'
  2646. o22 = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^'
  2647. o23 = '_`abcdefghijklmnopqrstuvwxyz{}~'
  2648. e21 = '&\<=>|()u *+"''-/,MI$kUHgW[_A5%w~Fh'
  2649. e22 = 't?K^l0jJP{98xBadb1nZimRyY]4}`o'
  2650. e23 = 'E;67V@vS:C.sNGzcefQpqTr!2#XDLO3'
  2651.  
  2652. /* Encrypt passwords */
  2653. PWD = translate(PWD, o21||o22||o23, e21||e22||e23)
  2654. POP_PWD = translate(POP_PWD, o21||o22||o23, e21||e22||e23)
  2655.  
  2656. parse var ydparms_dat dat '.' ext
  2657. if stream(ydparms_dat, 'c', 'query exists') \= '',
  2658.    then 'copy' ydparms_dat dat || '.bak'
  2659.  
  2660. call SysFileDelete ydparms_dat
  2661.          /* Output everything to file    */
  2662. call data    /* Read in the text to be output */
  2663. call lineout ydparms_dat, dataline0
  2664. if connection_type = 5 then call lineout ydparms_dat, dataline1
  2665. call lineout ydparms_dat, dataline2
  2666. call stream ydparms_dat, 'c', 'close'
  2667. yd_parms_dat = translate(ydparms_dat)
  2668. say ydparms_dat 'created/updated.'
  2669. say ''
  2670. RETURN
  2671.  
  2672. /*
  2673. ==============================================
  2674. A dataline which is output and becomes the
  2675. YD_PARMS.DAT data file.
  2676.  
  2677. Be very careful editing this.  These are long data
  2678. lines being continued with commas.  Make sure
  2679. every line but the last has comma at its end for each
  2680. of the three dataline statements.
  2681. ==============================================
  2682. */
  2683. DATA:
  2684.  
  2685. dataline0 = '#' ydparms_dat 'created/updated' Date() Time(),
  2686. || crlf || '#',
  2687. || crlf || '#    Edit with any ASCII text editor such as the OS/2 System Editor'
  2688.  
  2689. dataline1 = '#',
  2690. || crlf || '#    Created by installing YARNDIAL for connection_type = 5',
  2691. || crlf || '#    (May require editing to complete manual configuration)',
  2692. || crlf || '#'
  2693.  
  2694. dataline2 = '#    The # sign at the very beginning of a line comments out that line',
  2695. || crlf || '#',
  2696. || crlf || '# These are your Yarn %Home% and %Yarn% directories',
  2697. || crlf || 'HOME=' || home,
  2698. || crlf || 'YARN=' || yarn,
  2699. || crlf || '#',
  2700. || crlf || '# If DO_NOT_KILL_CONNECTION =1 then if one of the 7 keys in DNK_STRING',
  2701. || crlf || '# is pressed at the main menu instead of 1-7, YARNDIAL performs the same',
  2702. || crlf || '# actions as for 1 thru 7, but the connection is left up when transfers',
  2703. || crlf || '# are completed.',
  2704. || crlf || '# DNK_STRING defaults to !@#$%^& (shift-1 thru shift-7 on US keyboard).',
  2705. || crlf || '# Edit DNK_STRING to whatever 7 keys are convenient for your keyboard.',
  2706. || crlf || '#',
  2707. || crlf || 'DO_NOT_KILL_CONNECTION=' || do_not_kill_connection,
  2708. || crlf || 'DNK_STRING=' || dnk_string,
  2709. || crlf || '#',
  2710. || crlf || '# ABOUT THE CONNECTION_TYPE CHOICES:',
  2711. || crlf || '#   1 Installed for Advantis via IAK Dialer.',
  2712. || crlf || '#   2 (Reserved)',
  2713. || crlf || '#   3 Installed for use of a slip.exe or ppp.exe dialup string.',
  2714. || crlf || '#   4 Installed for SLIPPM (IBM''s Dial-Other-Internet-Providers.',
  2715. || crlf || '#     Utility) or a SLIPPM replacement such as ILINK/2, IN-JOY, etc.',
  2716. || crlf || '#   5 You chose manual configuration: to be prompted for key parameters',
  2717. || crlf || '#     followed by manually editing this file as necessary.',
  2718. || crlf || '#   6 Pot-Luck:  Tries to use any connection that happens to be',
  2719. || crlf || '#     established.  Connection must be made BEFORE you start YarnDial.',
  2720. || crlf || '#   7 Like 6, but does not check for a connection, and uses the string',
  2721. || crlf || '#     in dialup_string to dial.',
  2722. || crlf || '#   Anything but 1 or 3-7 for connection_type is an error condition.',
  2723. || crlf || '#',
  2724. || crlf || 'connection_type=' || connection_type,
  2725. || crlf || '#',
  2726. || crlf || '# ABOUT DIALUP_STRING:',
  2727. || crlf || '#   If you plan to use a ppp.exe or slip.exe or other dialup string',
  2728. || crlf || '#   which uses either SLIP.EXE or PPP.EXE to make the connection,',
  2729. || crlf || '#   enter it below if it has not automatically been entered.',
  2730. || crlf || '#   Read' YD_DOC 'for further information.',
  2731. || crlf || '#   YARNDIAL executes dialup_string as the evaluated expression:',
  2732. || crlf || '#      interpret dialup_string',
  2733. || crlf || '#   What you enter for dialup_string should consist of ''start''',
  2734. || crlf || '#   (always required) plus /N (usually) plus the dialer executable',
  2735. || crlf || '#   such as ppp.exe, slippm.exe, etc., plus any arguments.',
  2736. || crlf || '#',
  2737. || crlf || 'dialup_string=' || dialup_string,  
  2738. || crlf || '#',
  2739. || crlf || '# SETTING INTERFACE_REMOVAL:',
  2740. || crlf || '#   IN-JOY sometimes leaves behind a phantom router interface after',
  2741. || crlf || '#   the connection and IN-JOY are terminated.  You can test for this',
  2742. || crlf || '#   by running netstat -r after YARNDIAL (or INJOY) has shut down.',
  2743. || crlf || '#   You can wipe out such phantoms if you set interface_removal to',
  2744. || crlf || '#   1 or 2.  A setting of 0 is the default and does not do anything.',
  2745. || crlf || '#',
  2746. || crlf || '# interface_removal=0       Use this if you regularly establish',
  2747. || crlf || '#   simultaneous connections via SLIP or PPP through more than one COM',
  2748. || crlf || '#   port at a time.  But if phantom routings are left by IN-JOY, you',
  2749. || crlf || '#   will have to live with the problem.  Choose this if you never use',
  2750. || crlf || '#   IN-JOY.',
  2751. || crlf || '# interface_removal=1       Deletes any routing entries left standing',
  2752. || crlf || '#   but only if IN-JOY is your dialer and if the interf_prefix in the',
  2753. || crlf || '#   routing entry matches IN-JOY''s  Suggestion: set the interface',
  2754. || crlf || '#   name in one of the IN-JOY OPTIONS pages to something unique for',
  2755. || crlf || '#   your connection to achieve maximum selectivity during operation of',
  2756. || crlf || '#   interface_removal = 1 (an IN-JOY interface name up to five letters',
  2757. || crlf || '#   long can be used)',
  2758. || crlf || '# interface_removal = 2       Whatever the dialer and interf_prefix',
  2759. || crlf || '#   deletes all routing entries at shut_down of YARNDIAL.  If you',
  2760. || crlf || '#   have a problem with phantom routings using IN-JOY and never expect',
  2761. || crlf || '#   to have make simultaneous connections via SLIP or PPP through more',
  2762. || crlf || '#   than one COM port at a time,  try setting interface_removal = 2.',  
  2763. || crlf || '#',
  2764. || crlf || 'interface_removal=' || interface_removal,
  2765. || crlf || '#',
  2766. || crlf || '# ABOUT ZIP/UNZIP UTILITIES:',
  2767. || crlf || '# Depending upon what compress and uncompress utilities you use',
  2768. || crlf || '# you may need to edit zip_exe= and unzip_exe=  below (use full paths)',
  2769. || crlf || '#                       Samples:',
  2770. || crlf || '#       OS/2 InfoZip compress/uncompress programs:',
  2771. || crlf || '#          zip_exe=d:\pk_unpk\zip201c2\zip.exe -0m',
  2772. || crlf || '#          unzip_exe=d:\pk_unpk\unz512x2\unzip.exe -o',
  2773. || crlf || '#',
  2774. || crlf || '#       MS-DOS PkWare compress/uncompress programs:',
  2775. || crlf || '#          zip_exe=cmd.exe /c c:\path\pkzip -m -u -o',
  2776. || crlf || '#          unzip_exe=cmd.exe /c c:\path\pkunzip -o',
  2777. || crlf || '# Using another compress/uncompress set?  Refer to' yd_doc || '.',
  2778. || crlf || '# For any MSDOS based ones, you must use  cmd.exe /c  to call them',
  2779. || crlf || '# as shown for the PkWare examples',
  2780. || crlf || '#',
  2781. || crlf || 'zip_exe=' || zip_exe,
  2782. || crlf || 'unzip_exe=' || unzip_exe,
  2783. || crlf || '#',
  2784. || crlf || '#',
  2785. || crlf || '# host (the domain), user (e-mail ID) are from YARN''s CONFIG file.',
  2786. || crlf || '# reply_packet holds the value assigned to reply-packet in YARN''s',
  2787. || crlf || '# CONFIG file.',
  2788. || crlf || '#',
  2789. || crlf || 'host=' || host,
  2790. || crlf || 'user=' || user,
  2791. || crlf || 'reply_packet=' || reply_packet,
  2792. || crlf || '#',
  2793. || crlf || 'souper_exe=' || souper_exe, 
  2794. || crlf || 'yarn_exe=' || yarn_exe, 
  2795. || crlf || 'import_exe=' || import_exe, 
  2796. || crlf || 'export_exe=' || export_exe, 
  2797. || crlf || 'expire_exe=' || expire_exe, 
  2798. || crlf || 'rebuild_exe=' || rebuild_exe,
  2799. || crlf || 'go_exe=' || go_exe,
  2800. || crlf || 'killjoy_exe=' || killjoy_exe,
  2801. || crlf || 'alt_dialer_exe=' || alt_dialer_exe,
  2802. || crlf || '#',
  2803. || crlf || '# ABOUT INTERF_PREFIX',
  2804. || crlf || '# The IN-JOY dialer allows the user during dialer configuration to',
  2805. || crlf || '# specify a custom name (up to 5 characters) for the named-interface',
  2806. || crlf || '# prefix in place of the more usual ppp or sl or slip or lan prefixes',
  2807. || crlf || '# (as examples).  In multi-user YARNDIAL installations using IN-JOY as',
  2808. || crlf || '# the dialer, this interface-prefix parameter may be set to be unique',
  2809. || crlf || '# for each user and we can use it as an identifier.  For other dialers',
  2810. || crlf || '# interf_prefix defaults to PPP, ppp or SL or sl, etc., depending on',
  2811. || crlf || '# what is indicated for SERVICE and what is known about the dialer.', 
  2812. || crlf || '#',
  2813. || crlf || 'interf_prefix=' || interf_prefix,
  2814. || crlf || '#',
  2815. || crlf || '#',
  2816. || crlf || '# CUSTOMIZING SOUPER RUN-TIME OPTIONS',
  2817. || crlf || '# You can modify the runtime options for souper.exe by editing these',
  2818. || crlf || '# Read over' yd_doc 'and the souper documentation before doing so.',
  2819. || crlf || '# DO NOT change the ones indicated as _std_ .  Especially, DO NOT',
  2820. || crlf || '# remove the -i''s because we read our set up variables from this file',
  2821. || crlf || '# and not from the TCP-IP settings notebooks when we run the souper',
  2822. || crlf || '# program.',
  2823. || crlf || '#',
  2824. || crlf || 'souper_getmail_std_options=' || souper_getmail_std_options,
  2825. || crlf || 'souper_getnews_std_options=' || souper_getnews_std_options,
  2826. || crlf || 'souper_send_std_options=' || souper_send_std_options,
  2827. || crlf || 'getmail_xtra_options=' || getmail_xtra_options,
  2828. || crlf || 'getnews_xtra_options=' || getnews_xtra_options,
  2829. || crlf || 'send_xtra_options=' || send_xtra_options,
  2830. || crlf || '#',
  2831. || crlf || '#',
  2832. || crlf || '# wait is a dialer timeout, in seconds',
  2833. || crlf || 'wait=' || wait, 
  2834. || crlf || '#',
  2835. || crlf || '#    The following is the name of the Dial-Other-Internet-Providers',
  2836. || crlf || '#    app in TCPOS2.INI, or the host-name argument for the dialer command',
  2837. || crlf || 'host_app=' || host_app,
  2838. || crlf || '#',
  2839. || crlf || '#   Parms extracted from the TCPOS2.INI file, from',
  2840. || crlf || '#   the IAK DIALER.INI file, combined (where they overlap)',
  2841. || crlf || '#   using wherever possible the TCPOS2.INI key names',
  2842. || crlf || '#',
  2843. || crlf || 'account=' || account,
  2844. || crlf || 'ASK=' ||ASK,
  2845. || crlf || 'IS1=' ||IS1,
  2846. || crlf || 'IS2=' ||IS2,
  2847. || crlf || 'RS1=' ||RS1,
  2848. || crlf || 'RS2=' ||RS2,
  2849. || crlf || 'FS1=' ||FS1,
  2850. || crlf || 'FS2=' ||FS2,
  2851. || crlf || 'PIN=' ||PIN,
  2852. || crlf || '#',
  2853. || crlf || '#',
  2854. || crlf || 'PROVIDER=' || PROVIDER,
  2855. || crlf || 'LOGIN_ID=' || LOGIN_ID,
  2856. || crlf || 'PWD=' || PWD,
  2857. || crlf || 'SAVE_PWD=' || SAVE_PWD,
  2858. || crlf || 'PHONE_NUMBER=' || PHONE_NUMBER,
  2859. || crlf || 'HANGUP=' || HANGUP,
  2860. || crlf || 'SCRIPT=' || SCRIPT,
  2861. || crlf || 'SERVICE=' || SERVICE,
  2862. || crlf || 'YOURIP=' || YOURIP,
  2863. || crlf || 'DESTIP=' || DESTIP,
  2864. || crlf || 'NETMASK=' || NETMASK,
  2865. || crlf || 'MTU_SIZE=' || MTU_SIZE,
  2866. || crlf || 'VJ_COMP=' || VJ_COMP,
  2867. || crlf || 'PRIMARY_INF=' || PRIMARY_INF,
  2868. || crlf || 'HOSTNAME=' || HOSTNAME,
  2869. || crlf || 'DOMAIN_NAME=' || DOMAIN_NAME,
  2870. || crlf || 'DNS=' || DNS,
  2871. || crlf || 'DNS2=' || DNS2,
  2872. || crlf || 'DEFAULT_NEWS=' || DEFAULT_NEWS,
  2873. || crlf || 'DEFAULT_WWW=' || DEFAULT_WWW,
  2874. || crlf || 'DEFAULT_GOPHER=' || DEFAULT_GOPHER,
  2875. || crlf || 'MAIL_GW=' || MAIL_GW,
  2876. || crlf || 'POPSRVR=' || POPSRVR,
  2877. || crlf || 'REPLY_DOMAIN=' || REPLY_DOMAIN,
  2878. || crlf || 'REPLY_ID=' || REPLY_ID,
  2879. || crlf || 'POP_ID=' || POP_ID,
  2880. || crlf || 'POP_PWD=' || POP_PWD,
  2881. || crlf || 'MODEM_TYPE=' || MODEM_TYPE,
  2882. || crlf || 'COMPORT=' || COMPORT,
  2883. || crlf || 'BAUD=' || BAUD,
  2884. || crlf || 'DATABITS=' || DATABITS,
  2885. || crlf || 'PARITY=' || PARITY,
  2886. || crlf || 'DIAL_MODE=' || DIAL_MODE,
  2887. || crlf || 'PREFIX=' || PREFIX,
  2888. || crlf || 'PREFIX_ANS=' || PREFIX_ANS,
  2889. || crlf || 'INIT=' || INIT,
  2890. || crlf || 'INIT2=' || INIT2,
  2891. || crlf || 'DISABLE=' || DISABLE,
  2892. || crlf || 'DISABLE_SEQ=' || DISABLE_SEQ,
  2893. || crlf || 'DIAL_PREFIX=' || DIAL_PREFIX,
  2894. || crlf || 'AUTOSTART=' || AUTOSTART,
  2895. || crlf || 'TOTAL_CONNECT=' || TOTAL_CONNECT,
  2896. || crlf || '#',
  2897. || crlf || '# End of' ydparms_dat    /* No comma at the end of this line */
  2898. RETURN          
  2899.  
  2900. /*
  2901. ==============================================
  2902. copy_ydfiles()
  2903.  
  2904. Copy over files from the installation
  2905. directory to the home directory.  We expect to find the icon
  2906. files in a subdirectory (ICONS) but if you happened to use
  2907. PkWare unzip without the -d option they will not be
  2908. there so we will look for them in the installer's directory
  2909. also to avoid an abortable error.
  2910. ==============================================
  2911. */
  2912. copy_ydfiles:
  2913.  
  2914. /*
  2915. ============================
  2916. Create an incoming subdirectory in the home directory
  2917. if not there already.  This is for use in running souper
  2918. and has nothing to do with completing this installation of
  2919. YarnDial
  2920. ============================
  2921. */
  2922.  
  2923. call SysMkDir home || '\incoming'
  2924.  
  2925. /* But we do need to create an ICONS subdirectory in our target
  2926. home directory as part of the installation */
  2927.  
  2928. call SysMkDir home || '\icons'
  2929.  
  2930. /* get down to filename only, strip and path, arguments */
  2931. yd_cmd = filespec('name', yd_cmd)
  2932. ydinstl_cmd = filespec('name', ydinstl_cmd)
  2933. yarn_ico = filespec('name', yarn_ico)
  2934. yd_doc = filespec('name', yd_doc)
  2935. readme_1st = filespec('name', readme_1st)
  2936. go_exe = filespec('name', go_exe)
  2937. yarn_ico = filespec('name', yarn_ico)
  2938. yarndial_ico = filespec('name', yarndial_ico)
  2939. ydfold1_ico = filespec('name', ydfold1_ico)
  2940. ydfold2_ico = filespec('name', ydfold2_ico)
  2941. yarnshell_ico = yarn_ico
  2942. yarnutil_ico = filespec('name', yarnutil_ico)
  2943. ydinstl_ico = filespec('name', ydinstl_ico)
  2944. logoff_ico = filespec('name', logoff_ico)
  2945. renewzip_ico = filespec('name', renewzip_ico)
  2946.  
  2947. /*
  2948. ============================
  2949. First copy over icons. If they are not in an icons subdirectory
  2950. we look for them in the source directory.  And if they are only in
  2951. an icon subdirectory and the source_path is the same as home, we do
  2952. nothing as we can't copy something over onto itself
  2953.  
  2954. if we try a wildcard copy (copy *.ico) and there are no files to copy, we get an
  2955. error, so we need to have at least one file to copy.  Hence these awful multipart
  2956. conditionals
  2957. ============================
  2958. */
  2959.  
  2960. if home \= source_path then
  2961.    do
  2962.       if stream(source_path || '\icons\' || yarn_ico, 'c', 'query exists') \= '',
  2963.        | stream(source_path || '\icons\' || yarndial_ico, 'c', 'query exists') \= '',
  2964.        | stream(source_path || '\icons\' || ydfold1_ico, 'c', 'query exists') \= '',
  2965.        | stream(source_path || '\icons\' || ydfold2_ico, 'c', 'query exists') \= '',
  2966.        | stream(source_path || '\icons\' || yarnutil_ico, 'c', 'query exists') \= '',
  2967.        | stream(source_path || '\icons\' || ydinstl_ico, 'c', 'query exists') \= '',
  2968.        | stream(source_path || '\icons\' || renewzip_ico, 'c', 'query exists') \= '',
  2969.        | stream(source_path || '\icons\' || logoff_ico, 'c', 'query exists') \= '' then
  2970.             do
  2971.                say 'Copying icon files from' source_path || '\icons to' HOME || '\icons'
  2972.                'copy' source_path || '\icons\' || '*.ico' home || '\icons' 
  2973.             end
  2974.    end
  2975.  
  2976. if stream(source_path || '\' || yarn_ico, 'c', 'query exists') \= '',
  2977.  | stream(source_path || '\' || yarndial_ico, 'c', 'query exists') \= '',
  2978.  | stream(source_path || '\' || ydfold1_ico, 'c', 'query exists') \= '',
  2979.  | stream(source_path || '\' || ydfold2_ico, 'c', 'query exists') \= '',
  2980.  | stream(source_path || '\' || yarnutil_ico, 'c', 'query exists') \= '',
  2981.  | stream(source_path || '\' || ydinstl_ico, 'c', 'query exists') \= '',
  2982.  | stream(source_path || '\' || renewzip_ico, 'c', 'query exists') \= '',
  2983.  | stream(source_path || '\' || logoff_ico, 'c', 'query exists') \= '' then
  2984.    do
  2985.       say 'Copying icon files from' source_path 'to' HOME || '\icons'
  2986.       'copy' source_path || '\' || '*.ico' home || '\icons' 
  2987.    end
  2988.  
  2989.  
  2990.   
  2991. /*
  2992. ============================
  2993. Then copy remaining files to complete the installation.  Again, if we are already
  2994. installing to the home directory and source_path is the home directory instead of
  2995. some other (temporary) one, just exit the routine because files are already where we
  2996. want them
  2997. ============================
  2998. */
  2999.  
  3000. if home = source_path then
  3001.    do
  3002.       nop
  3003.    end
  3004.  
  3005. else
  3006.    do
  3007.       say 'Copying rest of files from' source_path 'to' HOME
  3008.       home_drive
  3009.       'cd' home
  3010.  
  3011.       if stream(source_path || '\' || yd_cmd, 'c', 'query exists') \= '' then
  3012.          do
  3013.             'copy' source_path || '\' || yd_cmd
  3014.             if \SysSetIcon(yd_cmd, home || '\icons\' || yarndial_ico) then
  3015.                say 'unable to set icon for' yd_cmd '(NON-CRITICAL ERROR)'
  3016.          end
  3017.  
  3018.       if stream(source_path || '\' || ydinstl_cmd, 'c', 'query exists') \= ''  then
  3019.          do
  3020.             'copy' source_path || '\' || ydinstl_cmd
  3021.             if \SysSetIcon(ydinstl_cmd, home || '\icons\' || ydinstl_ico) then
  3022.                say 'unable to set icon for' ydinstl_cmd '(NON-CRITICAL ERROR)'         
  3023.          end
  3024.  
  3025.    if stream(source_path || '\' || yd_doc, 'c', 'query exists') \= '' then
  3026.       'copy' source_path || '\' || yd_doc
  3027.  
  3028.    if stream(source_path || '\' || readme_1st, 'c', 'query exists') \= '' then
  3029.       'copy' source_path || '\' || readme_1st
  3030.  
  3031.    if stream(source_path || '\' || go_exe, 'c', 'query exists') \= '' then
  3032.       'copy' source_path || '\' || go_exe
  3033. end /* of else */
  3034.  
  3035. completed = 1
  3036. RETURN
  3037.  
  3038. /*
  3039. =======================================================
  3040. We create  a suite of small REXX programs and save them to the HOME
  3041. directory we are now installing to.  All of these will run with the OS/2
  3042. environment variable, HOME, set using SetLocal() to the unique home
  3043. directory chosen for this particular user installation.
  3044.  
  3045. First we create a program (YRNSHELL.CMD) which starts
  3046. yarn.exe for this particular user installation.
  3047. =======================================================
  3048. */ 
  3049. create_yarnshell_cmd:
  3050. say 'Creating customized .CMD files for the' home 'directory'
  3051. home_drive
  3052. 'cd' home
  3053.  
  3054. yarnshell_cmd = filespec('name', yarnshell_cmd)
  3055.  
  3056. call SysFileDelete yarnshell_cmd
  3057.  
  3058. /* Now create yarnshell_cmd as a .CMD file in the HOME directory */
  3059.  
  3060. dataline = '/*' yarnshell_cmd,
  3061. || crlf || 'Program to start' yarn_exe,
  3062. || crlf || 'Created by YARNDIAL''s' ydinstl_cmd date() time(),
  3063. || crlf || 'Sets' HOME 'as the HOME env. variable',
  3064. || crlf || 'and sets' yarn 'as the YARN env. variable.',
  3065. || crlf || 'Sets working directory to' yarn,
  3066. || crlf || 'Sets OS/2 window to 80 chars x 40 lines   */' || crlf,
  3067. || crlf || 'x = SetLocal()',
  3068. || crlf || '''@echo off''',
  3069. || crlf || 'x = value(''home'', ''' || home || ''', ''OS2ENVIRONMENT'')',
  3070. || crlf || 'x = value(''yarn'', ''' || yarn || ''', ''OS2ENVIRONMENT'')',
  3071. || crlf || home_drive,
  3072. || crlf || '''cd' home || '''',
  3073. || crlf || '''' || conmode || '''',
  3074. || crlf || '''' || yarn_exe || '''',
  3075. || crlf || 'x = EndLocal()'
  3076.  
  3077. call lineout yarnshell_cmd, dataline
  3078. call stream yarnshell_cmd, 'c', 'close'
  3079. say '  ' yarnshell_cmd 'created/updated.'
  3080. if \SysSetIcon(yarnshell_cmd, home || '\icons\' || yarn_ico) then
  3081.    say 'unable to set icon for' yarnshell_cmd '(NON-CRITICAL ERROR)'
  3082. RETURN
  3083.  
  3084.  
  3085. /*
  3086. =======================================================
  3087. Create a program (YRNUTIL.CMD) to run yarn utilities for
  3088. this particular user installation.  It temporarily sets
  3089. a variable named home in the the OS/2 environment to the
  3090. home directory chosen for this particular user installation,
  3091. then prompts for the yarn utility to run, then runs it.
  3092. =======================================================
  3093. */ 
  3094.  
  3095. create_yarnutil_cmd:
  3096. home_drive
  3097. 'cd' home
  3098.  
  3099. yarnutil_cmd = filespec('name', yarnutil_cmd)
  3100.  
  3101. call SysFileDelete yarnutil_cmd
  3102.  
  3103. /* Now create yarnutil_cmd as a .CMD file in the HOME directory */
  3104.  
  3105. dataline = '/* */',
  3106. || crlf || 'say ''' || yarnutil_cmd || '''',
  3107. || crlf || 'say ''Program to start a yarn executable.''',
  3108. || crlf || 'say ''Sets' HOME 'as the HOME env. variable''',
  3109. || crlf || 'say ''and sets' yarn 'as the YARN env. variable.''',
  3110. || crlf || 'say ''Sets working directory to' yarn || '''',
  3111. || crlf || 'say ''Created by YARNDIAL''''s' ydinstl_cmd date() time() || '''',
  3112. || crlf || 'say ''''',
  3113. || crlf || '/* Load RexxUtil if not already loaded */',
  3114. || crlf || 'if RxFuncQuery(''SysLoadFuncs'') \= 0 then',
  3115. || crlf || '   do',
  3116. || crlf || '      call RxFuncAdd ''SysLoadFuncs'', ''REXXUTIL'', ''SysLoadFuncs''',
  3117. || crlf || '      call SysLoadFuncs',
  3118. || crlf || '   end',
  3119. || crlf || 'x = SetLocal()',
  3120. || crlf || '''@echo off''',
  3121. || crlf || 'x = value(''home'', ''' || home || ''', ''OS2ENVIRONMENT'')',
  3122. || crlf || 'x = value(''yarn'', ''' || yarn || ''', ''OS2ENVIRONMENT'')',
  3123. || crlf || yarn_drive,
  3124. || crlf || '''cd' yarn || '''',
  3125. || crlf || 'say ''What yarn utility do you want to run?''',
  3126. || crlf || 'prompt = ''Omit the path. Enter:''',
  3127. || crlf || 'say prompt',
  3128. || crlf || 'parse value SysCurPos() with row col',
  3129. || crlf || 'row  = row - 1',
  3130. || crlf || 'col = length(prompt) + 2',
  3131. || crlf || 'call SysCurPos row, col',
  3132. || crlf || 'parse pull yarn_utility',
  3133. || crlf || 'yarn_utility',
  3134. || crlf || 'x = EndLocal()',
  3135. || crlf || 'say ''''',
  3136. || crlf || 'say ''Done.  Press any key to exit...''',        
  3137. || crlf || 'answer = SysGetKey(''NOECHO'')'
  3138.  
  3139. call lineout yarnutil_cmd, dataline
  3140. call stream yarnutil_cmd, 'c', 'close'
  3141. say '  ' yarnutil_cmd 'created/updated.'
  3142. if \SysSetIcon(yarnutil_cmd, home || '\icons\' || yarnutil_ico) then
  3143.    say 'unable to set icon for' yarnutil_cmd '(NON-CRITICAL ERROR)'
  3144. RETURN
  3145.  
  3146. /*
  3147. =======================================================
  3148. Create a logoff program (LOGOFF.CMD).  It determines if
  3149. any of the following are up and running, and if so, closes
  3150. them down: SLIP.EXE, PPP.EXE, DIALER.EXE, SLIPPM.EXE.
  3151. This will work in any environment but we place a copy
  3152. in each home directory we install to (convenient to do so).
  3153.  
  3154. I wanted something like this so if for some reason I was
  3155. logged on and wanted a sure-fire shut-down freeing up my
  3156. phone line, I could do it with one double-click.
  3157.  
  3158. This uses go.exe from GO_15.EXE.  go.exe is supplied with
  3159. this yarndial/installer package.
  3160. =======================================================
  3161. */ 
  3162.  
  3163. create_logoff_cmd:
  3164. home_drive
  3165. 'cd' home
  3166.  
  3167. logoff_cmd = filespec('name', logoff_cmd)
  3168.  
  3169. call SysFileDelete logoff_cmd
  3170.  
  3171. /* Now create logoff_cmd as a .CMD file in the HOME directory */
  3172.  
  3173. dataline = '/* */',
  3174. || crlf || 'say ''' || logoff_cmd || '''',
  3175. || crlf || 'say ''Shutdown of IAK Dialer, SLIP, PPP, SLATTACH, SLIPPM, IN-JOY''',
  3176. || crlf || 'say ''Created by YARNDIAL''''s' ydinstl_cmd date() time() || '''' || crlf,
  3177. || crlf || 'say ''''',
  3178. || crlf || '/* --------  you can edit these 3 things -------- */',
  3179. || crlf || 'go_exe = ''' || go_exe || '''    /* full path to GO_15''s GO.EXE */',
  3180. || crlf || 'killjoy_exe = ''' || killjoy_exe || '''    /* full path to IN-JOY''s KILLJOY.EXE */',
  3181. || crlf || 'settle_time = 10  /* seconds,  settle down before rechecking */' || crlf || crlf,
  3182. || crlf || '/* Load RexxUtil if not already loaded */',
  3183. || crlf || 'if RxFuncQuery(''SysLoadFuncs'') \= 0 then',
  3184. || crlf || '   do',
  3185. || crlf || '      call RxFuncAdd ''SysLoadFuncs'', ''REXXUTIL'', ''SysLoadFuncs''',
  3186. || crlf || '      call SysLoadFuncs',
  3187. || crlf || '   end',
  3188. || crlf || '''@echo off''',
  3189. || crlf || 'call is_process_running ''DIALER''',
  3190. || crlf || 'call is_process_running ''SLIP''',
  3191. || crlf || 'call is_process_running ''PPP''',
  3192. || crlf || 'call is_process_running ''SLATTACH''',
  3193. || crlf || 'call is_process_running ''SLIPPM''',
  3194. || crlf || 'call is_process_running ''ILINK2''' || crlf,
  3195. || crlf || 'if ''' || alt_dialer || ''' \= ''DIALER'',',
  3196. || crlf || '   & ''' || alt_dialer || ''' \= ''SLIP'',',
  3197. || crlf || '   & ''' || alt_dialer || ''' \= ''PPP'',',
  3198. || crlf || '   & ''' || alt_dialer || ''' \= ''SLIPPM'',',
  3199. || crlf || '   & ''' || alt_dialer || ''' \= ''ILINK2'',',
  3200. || crlf || '   & ''' || alt_dialer || ''' \= ''IN-JOY'' then',
  3201. || crlf || '   call is_process_running ''' || alt_dialer || '''',
  3202. || crlf || 'if stream(''' || killjoy_exe || ''', ''c'', ''query exists'') \= '''' then',
  3203. || crlf || '   do',
  3204. || crlf || '      ''' || killjoy_exe || '''',
  3205. || crlf || '      call SysSleep 3 /* settle time */',
  3206. || crlf || '   end',
  3207. || crlf || 'call is_process_running ''IN-JOY''', 
  3208. || crlf || 'say ''Waiting'' settle_time ''secs. before testing them all again...''',
  3209. || crlf || 'call SysSleep settle_time' || crlf,
  3210. || crlf || 'call is_process_running ''DIALER''',
  3211. || crlf || 'call is_process_running ''SLIP''',
  3212. || crlf || 'call is_process_running ''PPP''',
  3213. || crlf || 'call is_process_running ''SLATTACH''',
  3214. || crlf || 'call is_process_running ''SLIPPM''',
  3215. || crlf || 'call is_process_running ''ILINK2''' || crlf,
  3216. || crlf || 'if ''' || alt_dialer || ''' \= ''DIALER'',',
  3217. || crlf || '   & ''' || alt_dialer || ''' \= ''SLIP'',',
  3218. || crlf || '   & ''' || alt_dialer || ''' \= ''PPP'',',
  3219. || crlf || '   & ''' || alt_dialer || ''' \= ''SLIPPM'',',
  3220. || crlf || '   & ''' || alt_dialer || ''' \= ''ILINK2'',',
  3221. || crlf || '   & ''' || alt_dialer || ''' \= ''IN-JOY'' then',
  3222. || crlf || '   call is_process_running ''' || alt_dialer || '''',
  3223. || crlf || 'if stream(''' || killjoy_exe || ''', ''c'', ''query exists'') \= '''' then',
  3224. || crlf || '   do',
  3225. || crlf || '      ''' || killjoy_exe || '''',
  3226. || crlf || '      call SysSleep 3 /* settle time */',
  3227. || crlf || '   end',
  3228. || crlf || 'call is_process_running ''IN-JOY''', 
  3229. || crlf || 'say ''Press any key to exit...''',        
  3230. || crlf || 'answer = SysGetKey(''NOECHO'')',
  3231. || crlf || 'EXIT' || crlf || crlf,
  3232. || crlf || 'is_process_running:',
  3233. || crlf || 'parse upper arg process            /* Check if it is */',
  3234. || crlf || 'go_exe ''-cp'' process ''>nul''    /* returns RC=1 if process is running, 0 if not */',
  3235. || crlf || 'If RC then',
  3236. || crlf || '   do',
  3237. || crlf || '      say process ''is running''',
  3238. || crlf || '      if process = ''DIALER'' then',
  3239. || crlf || '         do',
  3240. || crlf || '            process ''-c>nul'', /* hope it''s at least v 1.33 */',
  3241. || crlf || '            call SysSleep 3 /* settle time, IAK Dialer is funny */',
  3242. || crlf || '            say ''   If you lost this window for a few seconds or just heard a beep''',
  3243. || crlf || '            say ''   that is normal for closing down certain versions of IAK Dialer''',
  3244. || crlf || '         end',
  3245. || crlf || '   end',
  3246. || crlf || 'else say process ''is not running''',
  3247. || crlf || 'go ''-ka'' process ''>nul''  /* do a kill whether running or not */',
  3248. || crlf || 'RETURN'
  3249.  
  3250. call lineout logoff_cmd, dataline
  3251. call stream logoff_cmd, 'c', 'close'
  3252. say '  ' logoff_cmd 'created/updated.'
  3253. if \SysSetIcon(logoff_cmd, home || '\icons\' || logoff_ico) then
  3254.    say 'unable to attach icon for' logoff_cmd '(NON-CRITICAL ERROR)'
  3255. RETURN
  3256.  
  3257.  
  3258. /*
  3259. =======================================================
  3260. Create a program (RENEWZIP.CMD) to rename to a .ZIP file
  3261. the reply_packet ZIP file for this user that we had backed
  3262. up as a *.BAK file when last we exported posts and mail.
  3263. If something went wrong with sending/posting, this
  3264. renewzip.cmd restores the .ZIP and allows us a second shot.
  3265. =======================================================
  3266. */ 
  3267.  
  3268. create_renewzip_cmd:
  3269. home_drive
  3270. 'cd' home
  3271. renewzip_cmd = filespec('name', renewzip_cmd)
  3272. parse var renewzip_cmd renewzip '.' ext
  3273. call SysFileDelete renewzip_cmd
  3274.  
  3275. reply_packet = translate(reply_packet)
  3276.  
  3277. parse var reply_packet reply '.' ext
  3278. reply_bak = reply || '.BAK'
  3279. reply_asterisk = reply || '.*'
  3280.  
  3281. /* Now create renewzip_cmd as a .CMD file in the HOME directory */
  3282.  
  3283. dataline = '/* */',
  3284. || crlf || 'say ''' || renewzip_cmd || '''',
  3285. || crlf || 'say ''Restores' reply_packet 'by renaming the *.BAK to *.ZIP''',
  3286. || crlf || 'say ''Created by YARNDIAL''''s' ydinstl_cmd date() time() || '''',
  3287. || crlf || 'say ''DIR run below should confirm restoration of the *.ZIP''',
  3288. || crlf || 'say ''''',
  3289. || crlf || '/* Load RexxUtil if not already loaded */',
  3290. || crlf || 'if RxFuncQuery(''SysLoadFuncs'') \= 0 then',
  3291. || crlf || '   do',
  3292. || crlf || '      call RxFuncAdd ''SysLoadFuncs'', ''REXXUTIL'', ''SysLoadFuncs''',
  3293. || crlf || '      call SysLoadFuncs',
  3294. || crlf || '   end',
  3295. || crlf || '''@echo off''',
  3296. || crlf || 'if stream(''' || reply_bak || ''', ''c'', ''query exists'') \= '''' then',
  3297. || crlf || '   do',
  3298. || crlf || '      ''copy' reply_bak reply_packet || '''',
  3299. || crlf || '      ''dir' reply_asterisk || '''',
  3300. || crlf || '   end',
  3301. || crlf || 'else say ''no' reply_bak 'to restore''',
  3302. || crlf || 'say ''''',
  3303. || crlf || 'say ''Press any key to exit...''',        
  3304. || crlf || 'answer = SysGetKey(''NOECHO'')'
  3305.  
  3306. call lineout renewzip_cmd, dataline
  3307. call stream renewzip_cmd, 'c', 'close'
  3308. say '  ' renewzip_cmd 'created/updated.'
  3309. if \SysSetIcon(renewzip_cmd, home || '\icons\' || renewzip_ico) then
  3310.    say 'unable to attach icon for' renewzip_cmd '(NON-CRITICAL ERROR)'
  3311. RETURN
  3312.  
  3313. /*
  3314. ==============================================
  3315. create_yarndial_objects()
  3316.  
  3317. Create a folder on the desktop uniquely named for
  3318. our user installation.  Into it place our objects also named
  3319. to identify them with the specific home directory for which
  3320. this installation was done.
  3321. ==============================================
  3322. */
  3323. create_yarndial_objects:
  3324.  
  3325. say 'Creating Desktop Folder object and its Program objects'
  3326.  
  3327. /* First create a Desktop Folder object for our YARNDIAL objects */
  3328.  
  3329. home = translate(home, Lowcase, Upcase)   /* to lower case */
  3330.  
  3331. classname = 'WPFolder'
  3332. folder_fore_title ='YarnDial Suite for' 
  3333. title = folder_fore_title || '^' || home
  3334. location = '<WP_DESKTOP>'
  3335. desktop_folder_object_id = '<' || title || '>'
  3336. iconfile = home || '\icons\' || ydfold1_ico    /* Animated folder icon (closed folder) */
  3337. iconnfile = home || '\icons\' || ydfold2_ico    /* Animated folder icon (open folder) */
  3338. startupdir = home
  3339. setup = 'OBJECTID=' || desktop_folder_object_id ||,
  3340.          ';ALWAYSSORT=YES' ||,
  3341.          ';ICONFILE=' || iconfile ||,
  3342.          ';ICONNFILE=1,' iconnfile
  3343.  
  3344. signal off error
  3345. if \SysCreateObject(classname, title, location, setup, 'U') then
  3346.    do
  3347.       say 'YARNDIAL FOLDER object creation unsuccessful'
  3348.       object_creation_error = 1
  3349.    end
  3350. else
  3351.   do
  3352.       say '   YARNDIAL FOLDER object created/updated successfully'
  3353.  
  3354. /* Folder created successfully? Then create all the program objects
  3355. and place them in the folder */
  3356.  
  3357. /* The desktop folder we just created is located at... */
  3358. location = desktop_folder_object_id   /* location for the rest is in the folder */
  3359.  
  3360. /* Create the object for YarnDial */
  3361.    classname = 'WPProgram'
  3362.    title = 'YarnDial for^' || home
  3363.    exename = home || '\' || yd_cmd
  3364.    iconfile = home || '\icons\' || yarndial_ico
  3365.    startupdir = home
  3366.  
  3367.    setup = 'OBJECTID=<' || title || '>' ||,
  3368.             ';ICONFILE=' || iconfile ||,
  3369.             ';EXENAME=' || exename ||,
  3370.             ';STARTUPDIR=' || startupdir
  3371.  
  3372.    if SysCreateObject(classname, title, location, setup, 'U') then
  3373.       do
  3374.          say '   YARNDIAL object created/updated successfully'
  3375.       end
  3376.    else
  3377.       do
  3378.          say 'YARNDIAL object creation unsuccessful'
  3379.          object_creation_error = 1
  3380.       end
  3381.  
  3382. /* and then do all of this until the end of the subroutine... */
  3383.  
  3384. /* Create an object for yarnshell_cmd */
  3385.    title = 'YARN Program for^' || home 
  3386.    exename = home || '\' || yarnshell_cmd
  3387.    iconfile = home || '\icons\' || yarn_ico
  3388.    startupdir = home
  3389.  
  3390.    setup = 'OBJECTID=<' || title || '>' ||,
  3391.             ';ICONFILE=' || iconfile ||,
  3392.             ';EXENAME=' || exename ||,
  3393.             ';STARTUPDIR=' || startupdir
  3394.  
  3395.    if SysCreateObject(classname, title, location, setup, 'U') then
  3396.       do
  3397.          say '  ' YARNSHELL_CMD 'object created/updated successfully'
  3398.       end
  3399.    else
  3400.       do
  3401.          say 'YRNSHELL object creation unsuccessful'
  3402.          object_creation_error = 1
  3403.       end
  3404.  
  3405. /* Create an object for yarnutil_cmd */
  3406.    title = 'YarnUtil from^' || home
  3407.    exename = home || '\' || yarnutil_cmd
  3408.    iconfile = home || '\icons\' || yarnutil_ico
  3409.    startupdir = home
  3410.  
  3411.    setup = 'OBJECTID=<' || title || '>' ||,
  3412.             ';ICONFILE=' || iconfile ||,
  3413.             ';EXENAME=' || exename ||,
  3414.             ';STARTUPDIR=' || startupdir
  3415.  
  3416.    if SysCreateObject(classname, title, location, setup, 'U') then
  3417.       do
  3418.          say '  ' YARNUTIL_CMD 'object created/updated successfully'
  3419.       end
  3420.    else
  3421.       do
  3422.          say 'YRNUTIL object creation unsuccessful'
  3423.          object_creation_error = 1
  3424.       end
  3425.  
  3426. /* Create an object for logoff_cmd */
  3427.    title = 'Logoff running from^' || home
  3428.    exename = home || '\' || logoff_cmd
  3429.    iconfile = home || '\icons\' || logoff_ico
  3430.    startupdir = home
  3431.  
  3432.    setup = 'OBJECTID=<' || title || '>' ||,
  3433.             ';ICONFILE=' || iconfile ||,
  3434.             ';EXENAME=' || exename ||,
  3435.             ';STARTUPDIR=' || startupdir
  3436.  
  3437.    if SysCreateObject(classname, title, location, setup, 'U') then
  3438.       do
  3439.          say '  ' LOGOFF_CMD 'object created/updated successfully'
  3440.       end
  3441.    else
  3442.       do
  3443.          say 'LOGOFF object creation unsuccessful'
  3444.          object_creation_error = 1
  3445.      end
  3446.  
  3447. /* Create an object for renewzip_cmd */
  3448.    title = 'Reply Zip Restorer for^' || translate(reply_packet, Lowcase, Upcase) /* to lower case */ 
  3449.    exename = home || '\' || renewzip_cmd
  3450.    iconfile = home || '\icons\' || renewzip_ico
  3451.    startupdir = home
  3452.  
  3453.    setup = 'OBJECTID=<' || title || '>' ||,
  3454.             ';ICONFILE=' || iconfile ||,
  3455.             ';EXENAME=' || exename ||,
  3456.             ';STARTUPDIR=' || startupdir
  3457.  
  3458.    if SysCreateObject(classname, title, location, setup, 'U') then
  3459.       do
  3460.          say '  ' RENEWZIP_CMD 'object created/updated successfully'
  3461.       end
  3462.    else
  3463.       do
  3464.          say 'RENEWZIP object creation unsuccessful'
  3465.          object_creation_error = 1
  3466.       end
  3467. END    /* creating program objects in the Desktop Folder we created */
  3468. if local_error_trapping then signal on error
  3469. RETURN
  3470.  
  3471. /*
  3472. =======================================================
  3473. recreate_objects_cmd()
  3474. Create a program (OBJECTS.CMD) to to be able to recreate the
  3475. YarnDial Desktop folder and objects in it.
  3476. =======================================================
  3477. */ 
  3478.  
  3479.  
  3480. recreate_objects_cmd:
  3481. /* Now create objects_cmd as a .CMD file in the HOME directory */
  3482. home_drive
  3483. 'cd' home
  3484. call SysFileDelete objects_cmd
  3485. say 'Creating a program to be able to recreate the YarnDial'
  3486. say 'desktop folder for this installation, and all of its objects'
  3487.  
  3488. dataline = '/*' || objects_cmd || '*/',
  3489. || crlf || 'say ''Created by YARNDIAL''''s' ydinstl_cmd date() time() || '''' || crlf,
  3490. || crlf || 'say ''Re-creates a Desktop Folder object and its Program objects''',
  3491. || crlf || 'say ''for the user whose HOME directory is'' translate(''' || home || ''')',
  3492. || crlf || 'say ''''' || crlf,
  3493. || crlf || '/* Load RexxUtil if not already loaded */',
  3494. || crlf || 'if RxFuncQuery(''SysLoadFuncs'') \= 0 then',
  3495. || crlf || '   do',
  3496. || crlf || '      call RxFuncAdd ''SysLoadFuncs'', ''REXXUTIL'', ''SysLoadFuncs''',
  3497. || crlf || '      call SysLoadFuncs',
  3498. || crlf || '   end' || crlf,
  3499. || crlf || 'say ''Press any key to continue.  CTRL-C quits.''',
  3500. || crlf || 'answer = SysGetKey(''NOECHO'')' || crlf,
  3501. || crlf || 'say ''''' || crlf,
  3502. || crlf || '/* First create a Desktop Folder object for our YARNDIAL objects */' ,
  3503. || crlf || 'Upcase = xrange(''A'', ''Z'')',
  3504. || crlf || 'Lowcase = xrange(''a'', ''z'')' || crlf,
  3505. || crlf || 'home = translate(''' || home || ''', Lowcase, Upcase)' || crlf,
  3506. || crlf || 'classname = ''WPFolder''',
  3507. || crlf || 'folder_fore_title =''YarnDial Suite for''', 
  3508. || crlf || 'title = folder_fore_title || ''^'' || home',
  3509. || crlf || 'location = ''<WP_DESKTOP>''',
  3510. || crlf || 'desktop_folder_object_id = ''<'' || title || ''>''',
  3511. || crlf || 'iconfile = home || ''\icons\' || ydfold1_ico || '''    /* Animated folder icon (closed folder) */',
  3512. || crlf || 'iconnfile = home || ''\icons\' || ydfold2_ico || '''    /* Animated folder icon (open folder) */',
  3513. || crlf || 'startupdir = home',
  3514. || crlf || 'setup = ''OBJECTID='' || desktop_folder_object_id ||,',
  3515. || crlf || '         '';ALWAYSSORT=YES'' ||,',
  3516. || crlf || '         '';ICONFILE='' || iconfile ||,',
  3517. || crlf || '         '';ICONNFILE=1,'' iconnfile' || crlf,
  3518. || crlf || 'if \SysCreateObject(classname, title, location, setup, ''U'') then',
  3519. || crlf || '   do',
  3520. || crlf || '      say ''YARNDIAL FOLDER object creation unsuccessful''',
  3521. || crlf || '   end',
  3522. || crlf || 'else',
  3523. || crlf || '   do',
  3524. || crlf || '      say ''YARNDIAL FOLDER object created/updated successfully''' || crlf,
  3525. || crlf || '/* Folder created successfully? Then create all the program objects',
  3526. || crlf || 'and place them in the folder */' || crlf,
  3527. || crlf || '/* The desktop folder we just created is located at... */',
  3528. || crlf || 'location = desktop_folder_object_id    /* location for the rest is in the folder */' || crlf,
  3529. || crlf || '/* Create the object for YarnDial */',
  3530. || crlf || '   classname = ''WPProgram''',
  3531. || crlf || '   title = ''YarnDial for^'' || home',
  3532. || crlf || '   exename = home || ''\' || yd_cmd || '''',
  3533. || crlf || '   iconfile = home || ''\icons\' || yarndial_ico || '''',
  3534. || crlf || '   startupdir = home' || crlf,
  3535. || crlf || '   setup = ''OBJECTID=<'' || title || ''>'' ||,',
  3536. || crlf || '            '';ICONFILE='' || iconfile ||,',
  3537. || crlf || '            '';EXENAME='' || exename ||,',
  3538. || crlf || '            '';STARTUPDIR='' || startupdir' || crlf,
  3539. || crlf || '   if SysCreateObject(classname, title, location, setup, ''U'') then',
  3540. || crlf || '      do' ,
  3541. || crlf || '         say ''YARNDIAL object created/updated successfully''',
  3542. || crlf || '      end',
  3543. || crlf || '   else',
  3544. || crlf || '      DO',
  3545. || crlf || '         say ''YARNDIAL object creation unsuccessful''',
  3546. || crlf || '      end' || crlf,
  3547. || crlf || '/* and then do all of this until the end of the subroutine... */' || crlf,
  3548. || crlf || '/* Create an object for yarnshell_cmd */',
  3549. || crlf || '   title = ''YARN Program for^'' || home', 
  3550. || crlf || '   exename = home || ''\' || yarnshell_cmd || '''',
  3551. || crlf || '   iconfile = home || ''\icons\' || yarn_ico || '''',
  3552. || crlf || '   startupdir = home' || crlf,
  3553. || crlf || '   setup = ''OBJECTID=<'' || title || ''>'' ||,',
  3554. || crlf || '            '';ICONFILE='' || iconfile ||,',
  3555. || crlf || '            '';EXENAME='' || exename ||,',
  3556. || crlf || '            '';STARTUPDIR='' || startupdir' || crlf,
  3557. || crlf || '   if SysCreateObject(classname, title, location, setup, ''U'') then',
  3558. || crlf || '      do',
  3559. || crlf || '         say YARNSHELL_CMD ''object created/updated successfully''',
  3560. || crlf || '      end',
  3561. || crlf || '   else',
  3562. || crlf || '      do',
  3563. || crlf || '         say ''YRNSHELL object creation unsuccessful''',
  3564. || crlf || '      end' || crlf,
  3565. || crlf || '/* Create an object for yarnutil_cmd */',
  3566. || crlf || '   title = ''YarnUtil from^'' || home',
  3567. || crlf || '   exename = home || ''\' || yarnutil_cmd || '''',
  3568. || crlf || '   iconfile = home || ''\icons\' || yarnutil_ico || '''',
  3569. || crlf || '   startupdir = home' || crlf,
  3570. || crlf || '   setup = ''OBJECTID=<'' || title || ''>'' ||,',
  3571. || crlf || '            '';ICONFILE='' || iconfile ||,',
  3572. || crlf || '            '';EXENAME='' || exename ||,',
  3573. || crlf || '            '';STARTUPDIR='' || startupdir' || crlf,
  3574. || crlf || '   if SysCreateObject(classname, title, location, setup, ''U'') then',
  3575. || crlf || '      do',
  3576. || crlf || '         say YARNUTIL_CMD ''object created/updated successfully''',
  3577. || crlf || '      end',
  3578. || crlf || '   else',
  3579. || crlf || '      do',
  3580. || crlf || '         say ''YRNUTIL object creation unsuccessful''',
  3581. || crlf || '      end' || crlf,
  3582. || crlf || '/* Create an object for logoff_cmd */',
  3583. || crlf || '   title = ''Logoff running from^'' || home',
  3584. || crlf || '   exename = home || ''\' || logoff_cmd || '''',
  3585. || crlf || '   iconfile = home || ''\icons\' || logoff_ico || '''',
  3586. || crlf || '   startupdir = home' || crlf,
  3587. || crlf || '   setup = ''OBJECTID=<'' || title || ''>'' ||,',
  3588. || crlf || '            '';ICONFILE='' || iconfile ||,',
  3589. || crlf || '            '';EXENAME='' || exename ||,',
  3590. || crlf || '            '';STARTUPDIR='' || startupdir' || crlf,
  3591. || crlf || '   if SysCreateObject(classname, title, location, setup, ''U'') then',
  3592. || crlf || '      do',
  3593. || crlf || '         say LOGOFF_CMD ''object created/updated successfully''',
  3594. || crlf || '      end',
  3595. || crlf || '   else',
  3596. || crlf || '      do',
  3597. || crlf || '         say ''LOGOFF object creation unsuccessful''',
  3598. || crlf || '     end' || crlf,
  3599. || crlf || '/* Create an object for renewzip_cmd */',
  3600. || crlf || '   title = ''Reply Zip Restorer for^'' || translate(''' || reply_packet || ''', Lowcase, Upcase) /* to lower case */', 
  3601. || crlf || '   exename = home || ''\' || renewzip_cmd || '''',
  3602. || crlf || '   iconfile = home || ''\icons\' || renewzip_ico || '''',
  3603. || crlf || '   startupdir = home' || crlf,
  3604. || crlf || '   setup = ''OBJECTID=<'' || title || ''>'' ||,',
  3605. || crlf || '            '';ICONFILE='' || iconfile ||,',
  3606. || crlf || '            '';EXENAME='' || exename ||,',
  3607. || crlf || '            '';STARTUPDIR='' || startupdir' || crlf,
  3608. || crlf || '   if SysCreateObject(classname, title, location, setup, ''U'') then',
  3609. || crlf || '      do',
  3610. || crlf || '         say RENEWZIP_CMD ''object created/updated successfully''',
  3611. || crlf || '      end',
  3612. || crlf || '   else',
  3613. || crlf || '      do',
  3614. || crlf || '         say ''RENEWZIP object creation unsuccessful''',
  3615. || crlf || '      end',
  3616. || crlf || 'END  /* creating program objects in the Desktop Folder we created */ ' ,
  3617. || crlf || 'say ''''',
  3618. || crlf || 'say ''Press any key to exit...''',        
  3619. || crlf || 'answer = SysGetKey(''NOECHO'')'
  3620.  
  3621. call lineout objects_cmd, dataline
  3622. call stream objects_cmd, 'c', 'close'
  3623. say '  ' objects_cmd 'created/updated successfully.'
  3624.  
  3625. RETURN
  3626.  
  3627. /*
  3628. =================
  3629. encry()
  3630.  
  3631. called by command line
  3632.     YDINSTL encrypt someword
  3633. where someword is encrypted
  3634. =================
  3635. */
  3636. encry:
  3637. o21 = '&\<=>|()! *+"''-/,#$%.0123456789:;?'
  3638. o22 = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^'
  3639. o23 = '_`abcdefghijklmnopqrstuvwxyz{}~'
  3640. e21 = '&\<=>|()u *+"''-/,MI$kUHgW[_A5%w~Fh'
  3641. e22 = 't?K^l0jJP{98xBadb1nZimRyY]4}`o'
  3642. e23 = 'E;67V@vS:C.sNGzcefQpqTr!2#XDLO3'
  3643.  
  3644. candidate = translate(candidate, o21||o22||o23, e21||e22||e23)
  3645.  
  3646. if encrypt then
  3647. do
  3648.    say ''
  3649.    our_dir = directory()    /* Where we are executing this pgm from */
  3650.    leng = length(candidate)
  3651.    call SysFileDelete our_dir || '\word.$$$'
  3652.    DL1 = 'encrypted=' || candidate,
  3653.    || crlf || 'Encrypted text is the' leng 'character string to the',
  3654.    || crlf || 'right of the FIRST equals sign in encrypted=' || crlf,
  3655.    || crlf || 'Be careful to select only those those' leng 'characters.',
  3656.    || crlf || 'for cutting-and-pasting.' || crlf
  3657.    DL2 = 'Do not be concerned if there is more than one equals',
  3658.    || crlf || 'sign, since characters may have been legitimately',
  3659.    || crlf || 'encoded to equals signs.',
  3660.    || crlf || '',
  3661.    || crlf || 'Remember to Erase' our_dir || '\word.$$$ when done.' 
  3662.    say DL1
  3663.    say 'That line is also stored as ASCII text in'
  3664.    say our_dir || '\word.$$$ for cutting-and-pasting.'
  3665.    say ''
  3666.    say DL2
  3667.    call lineout our_dir || '\word.$$$', DL1
  3668.    call lineout our_dir || '\word.$$$', DL2
  3669.    call stream our_dir || '\word.$$$', 'c', 'close'
  3670.    RETURN
  3671. end
  3672.  
  3673.  
  3674.  
  3675. /*
  3676. ==============================================
  3677. HANDLING OF ERROR TRAPS
  3678.  
  3679. ReXX Errors (failure, halt, syntax, novalue, error)
  3680. that occur with SIGNAL ON XXXXX (XXXXX = failure,
  3681. halt, etc.) are diverted (jump) to one of these
  3682. where the error and the offending line are identified.
  3683. ==============================================
  3684. */
  3685.  
  3686.    FAILURE:
  3687.    say 'Rexx FAILURE condition' rc 'in line' sigl ':' errortext(rc)
  3688.    say sourceline(sigl)
  3689.  
  3690.    call beep 300, 500
  3691.    signal goodbye
  3692.    RETURN
  3693.  
  3694.  
  3695.    HALT:
  3696.    say 'Rexx HALT condition' rc 'in line' sigl ':' errortext(rc)
  3697.    say sourceline(sigl)
  3698.  
  3699.    call beep 300, 500
  3700.    signal goodbye
  3701.    RETURN
  3702.  
  3703.  
  3704.    SYNTAX:
  3705.    say 'Rexx SYNTAX error' rc 'in line' sigl ':' errortext(rc)
  3706.    say sourceline(sigl)
  3707.  
  3708.    call beep 300, 500
  3709.    signal goodbye
  3710.    RETURN
  3711.  
  3712.  
  3713.    NOTREADY:
  3714.    say 'Rexx NOTREADY condition' rc 'in line' sigl ':' errortext(rc)
  3715.    say sourceline(sigl)
  3716.  
  3717.    call beep 300, 500
  3718.    signal goodbye
  3719.    RETURN
  3720.  
  3721.  
  3722.    ERROR:
  3723.    say 'Rexx ERROR condition' rc 'in line' sigl ':' errortext(rc)
  3724.    say sourceline(sigl)
  3725.  
  3726.    call beep 300, 500
  3727.    signal goodbye
  3728.    RETURN
  3729.  
  3730.  
  3731.    NOVALUE:
  3732.    say 'Rexx NOVALUE condition' rc 'in line' sigl ':' errortext(rc)
  3733.    say sourceline(sigl)
  3734.  
  3735.    call beep 300, 500
  3736.    signal goodbye
  3737.    RETURN
  3738.  
  3739. /*
  3740. ==============================================
  3741. GOODBYE()
  3742.  
  3743. Final "we did it" or "we didn't" message, and exit
  3744. ==============================================
  3745. */
  3746. GOODBYE:
  3747. say ''
  3748. if completed & findfile_ErrNum = 0 then
  3749.    do
  3750.       say 'Installation completed successfully'
  3751.       if object_creation_error then
  3752.          do
  3753.             say 'EXCEPT for desktop object creation.  All .CMD files'
  3754.             say 'are in the' home 'directory, though.'
  3755.          end
  3756.    end
  3757. if completed & findfile_ErrNum > 0 then
  3758.    do
  3759.       call SysCls
  3760.       say 'Installation completed.'
  3761.    end
  3762. if \completed | findfile_ErrNum > 0 | other_err then
  3763.    do
  3764.       say ''
  3765.       say '*************'
  3766.       say '   WARNING:'
  3767.       say 'An error was encountered during the installation'
  3768.       say '   or'
  3769.       say 'the installation was aborted before completion'
  3770.       say '*************'
  3771.       say ''
  3772.       call beep 262, 200
  3773.    end 
  3774.  
  3775. if completed then
  3776.    do
  3777.       say 'You may want to print out and inspect' ydparms_dat
  3778.       say 'Changes to it may be made using an ASCII editor such as the'
  3779.       say 'OS/2 System Editor without having to re-run' ydinstl_cmd
  3780.       say ''
  3781.    end
  3782.  
  3783. if findfile_ErrNum > 0 then
  3784.    do
  3785.       if findfile_ErrNum > 0 then
  3786.          do
  3787.             say ''
  3788.             say 'ERROR(S):'
  3789.             do while findfile_ErrNum > 0
  3790.                say 'Unable to locate any instance of',  
  3791.                unfound_file.findfile_ErrNum
  3792.                findfile_ErrNum = findfile_ErrNum - 1
  3793.                say ''
  3794.             end
  3795.          end
  3796.    end
  3797. say ''
  3798. say ijparms_errmsg1
  3799. say ijparms_errmsg2
  3800. say ''
  3801.  
  3802. say edit_dialup_string_msg
  3803. say 'YarnDial installation over at' time()
  3804. time = time('E')
  3805. time = time/60
  3806. time = format(time, ,1) 
  3807. say 'Elapsed time:' time 'minutes.'
  3808. say ''
  3809. say 'Press any key to exit...'
  3810. answer = SysGetKey('NOECHO')
  3811. call SysDropFuncs
  3812. x = endLocal()
  3813. EXIT
  3814. RETURN
  3815.  
  3816. /*
  3817. ==============================================
  3818. welcome_to_this_installer()
  3819.  
  3820. Long welcome message.  Put here for a neater
  3821. program, though we call to it near startup.
  3822. ==============================================
  3823. */
  3824. welcome_to_this_installer:
  3825. call SysCls
  3826. say ''
  3827. say 'Welcome! YARNDIAL installer, v.' version 'of' translate(ydinstl_cmd)
  3828. say '(c) 1996 Jerry Levy, Marblehead, MA USA (all rights reserved).'
  3829. say ''
  3830. say 'ABOUT THIS INSTALLER'
  3831. say 'This will install YarnDial on your machine, copying files to the'
  3832. say 'Yarn Home directory.  It should be very straightforward to use if'
  3833. say 'you have Yarn and Souper already up and running and did a pretty'
  3834. say 'much by-the-book installation of them.'
  3835. say ''
  3836. say 'If you have more than one Yarn home directory (Yarn allows separate'
  3837. say 'home directories for separate users or providers), you can select a'
  3838. say 'default or specify which one(s) to install to.'
  3839. say ''
  3840. say 'The installer creates a unique' translate(ydparms_dat) 'data file and a suite'
  3841. say 'of customized Rexx .CMD programs, all of which get stored in the'
  3842. say 'particular home directory you are installing to.  A YarnDial'
  3843. say 'Desktop Folder is created to house program objects.'
  3844. say ''
  3845. say translate(ydparms_dat) 'can be edited after the installation.'
  3846. say ''
  3847. say '(Continued -- Press any key)'
  3848. call SysGetKey 'NOECHO'
  3849. call SysCls
  3850. say ''
  3851. say 'INSTRUCTIONS (cont''d)'
  3852. say 'You will be asked what kind of zip and unzip utilities you are using.'
  3853. say 'Read' yd_doc 'if you need help.'
  3854. say ''
  3855. say 'No changes are made to your system until the very end of the'
  3856. say 'installation, so you may run through it without risk and escape out'
  3857. say 'before the end.'
  3858. say ''
  3859. say ''
  3860. say '' 
  3861. say 'Press any key to continue the installation (ESC quits)'
  3862. if SysGetKey('NOECHO') = Escape then signal goodbye
  3863. RETURN
  3864.  
  3865. /*
  3866. ==============================================
  3867. initialize_variables():
  3868.  
  3869. We make an early call to this to initialize
  3870. variables.  A long list so we put the routine
  3871. at the end of the program for neatness sake.
  3872. ==============================================
  3873. */
  3874. initialize_variables:
  3875. /* Default filenames and other stuff we need.
  3876.  
  3877. These are initialized to something because we want default values */
  3878. yarn_exe = 'YARN.EXE'
  3879. import_exe = 'IMPORT.EXE'
  3880. export_exe = 'EXPORT.EXE'
  3881. expire_exe = 'EXPIRE.EXE'
  3882. rebuild_exe = 'REBUILD.EXE'
  3883. filter_exe = 'FILTER.EXE'
  3884. souper_exe = 'SOUPER.EXE'
  3885. yarnshell_cmd = 'YRNSHELL.CMD'
  3886. yarnutil_cmd = 'YRNUTIL.CMD'
  3887. renewzip_cmd = 'RENEWZIP.CMD'
  3888. objects_cmd = 'OBJECTS.CMD'
  3889. logoff_cmd = 'LOGOFF.CMD'
  3890. go_exe = 'GO.EXE'
  3891. IAKdialer_exe = 'DIALER.EXE'
  3892. slippm_exe = 'SLIPPM.EXE'
  3893. ilink2_exe = 'ILINK2.EXE'
  3894. injoy_exe = 'IN-JOY.EXE'
  3895. killjoy_exe = 'KILLJOY.EXE'
  3896. hosts_dat = 'HOSTS.DAT'
  3897. alt_dialer_exe = SLIPPM_EXE
  3898. os2_zip_exe = 'ZIP.EXE'
  3899. os2_unzip_exe = 'UNZIP.EXE'
  3900. os2_zip_options = '-0m'
  3901. os2_unzip_options = '-o'
  3902. msdos_zip_exe = 'PKZIP.EXE'
  3903. msdos_unzip_exe = 'PKUNZIP.EXE'
  3904. msdos_zip_options = '-m -u -o'
  3905. msdos_unzip_options = '-o'
  3906. msdos_cmd_interp = 'CMD.EXE /C'
  3907. souper_getmail_std_options = '-i -n' 
  3908. getmail_xtra_options = '' 
  3909. souper_getnews_std_options = '-i -m' 
  3910. getnews_xtra_options = '' 
  3911. souper_send_std_options = '-i -s'
  3912. send_xtra_options = ''
  3913.  
  3914.  
  3915. /*
  3916. ===============
  3917. We set these remaining variables initially to a blank.
  3918. Some will become set in the course of the installation.
  3919. We do not want the yarndial data file we create
  3920. (YD_PARMS.DAT) to be all cluttered up with error
  3921. indications which is what happens if we don't assign
  3922. the blanks.
  3923. ===============
  3924. */
  3925. HOME=''
  3926. YARN=''
  3927. connection_type=''
  3928. interface_removal = 0
  3929. user=''
  3930. host = ''
  3931. account=''
  3932. ASK = ''
  3933. IS1 = ''
  3934. IS2 = ''
  3935. RS1 = ''
  3936. RS2 = ''
  3937. FS1 = ''
  3938. FS2 = ''
  3939. PIN = ''
  3940. wait = '' 
  3941. zip_exe = ''
  3942. unzip_exe = ''
  3943. host_app = ''
  3944. dialup_string = ''
  3945. do_not_kill = 0
  3946. dnk_string = '!@#$%^&'
  3947. Use_dialup_string = 'NO'
  3948. PROVIDER = ''
  3949. LOGIN_ID = ''
  3950. PWD = ''
  3951. SAVE_PWD = ''
  3952. PHONE_NUMBER = ''
  3953. HANGUP =  ''
  3954. SCRIPT = ''
  3955. SERVICE = ''
  3956. YOURIP = ''
  3957. DESTIP = ''
  3958. NETMASK = ''
  3959. MTU_SIZE = ''
  3960. VJ_COMP = ''
  3961. PRIMARY_INF = ''
  3962. HOSTNAME = ''
  3963. DOMAIN_NAME = ''
  3964. DNS = ''
  3965. DNS2 = ''
  3966. DEFAULT_NEWS = ''
  3967. DEFAULT_WWW = ''
  3968. DEFAULT_GOPHER = ''
  3969. MAIL_GW = ''
  3970. POPSRVR = ''
  3971. REPLY_DOMAIN = ''
  3972. REPLY_ID = ''
  3973. POP_ID = ''
  3974. POP_PWD = ''
  3975. MODEM_TYPE = ''
  3976. COMPORT = ''
  3977. BAUD = ''
  3978. DATABITS = ''
  3979. PARITY =  ''
  3980. DIAL_MODE = ''
  3981. PREFIX = ''
  3982. PREFIX_ANS = ''
  3983. INIT = ''
  3984. INIT2 = ''
  3985. DISABLE = ''
  3986. DISABLE_SEQ = ''
  3987. DIAL_PREFIX = ''
  3988. AUTOSTART = ''
  3989. TOTAL_CONNECT = ''
  3990.  
  3991. RETURN
  3992.  
  3993.